Application is built using graphql (hasura), postgres and nodejs. The app gets deployed to each clients separately having different DB and so on. Currently, we need to make connection to different clients, so they can access each other DB.
One architecture which makes sense is mesh where multiple clients can connect across each other. So there are basically 3 things which needs to be implemented: Query, Mutation and Subscription
.
I am trying to merge the results of the query fetching from all the clients when the request is triggered. This works but, is there any good way so I don't need to rewrite each and every custom query and mutation in hasura to handle multiple requests combing all the results. Same approach for mutation but redirecting the request to particular client.
Maybe a good way to do in Database itself combining multi DB? Or is there any good high level design which solves this problem?