Reputation: 752
We are using GraphQL as a middle-layer for data aggregation, filtration etc. However over time the number of queries have increased and so have the number of teams. We are currently deploying this as a monolith, however this creates problems since we have other team using the same GraphQL project and coordination during deployments becomes a challenge, to prevent queries that are being changed from being deployed prematurely.
One solution to this problem is use feature toggles or versioning while creating new queries or while changing existing queries.
However I want to understand if monolithic deployment is the only good way to deploy GraphQL or is it advisable to split the queries based on project teams or services types and deploy queries as separate components each with its own CI/CD pipeline. Thanks
Upvotes: 0
Views: 51
Reputation: 1961
You can have smaller graphql endpoints by each smaller service or microservice and then create a separate service to merge them using something like Apollo server and GraphQL tools https://www.apollographql.com/docs/apollo-server/api/graphql-tools/#mergeschemas
Upvotes: 1