tell me the best way to get data between graphql microservices and shared database?

The whole idea of GraphQL is to have a single endpoint. This reduces the complexity for the “front-end” developers (API consumers).

So you would have a GraphQL endpoint service that manages database access.

Usually “micro-services” have their own databases.

You can still put business logic in microservices, but you would have those services contact your GraphQL service for database access.

But if you are fronting the system with a GraphQL API, then you make a single endpoint.

To have these discrete microservices as you describe, you would usually make them REST or gRPC for the consumer.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top