Handling multiple server with the new client-preset recommendations #8707
Unanswered
pedropmedina
asked this question in
Q&A
Replies: 2 comments 1 reply
-
in general it is an anti-pattern for client apps to resolving data from multiple GraphQL services. Better is that the server stitches the sources and serves one unified schema. If that is not possible other options (which is just a work around imo) but doing client side composition of schema. Then FE developers just need to interact with one schema and everything else is abstracted away. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Does the projects in config help? https://the-guild.dev/graphql/codegen/docs/config-reference/multiproject-config |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Can anyone show me what's the right way of handling a configuration with several client connections.
Let's take a project where I have a connection for store api and another one for an auth api as example. Before I would model the queries in specific directories and point the documents to those directories.
That worked fine, but with the new recommendations, the goal is to keep your query in the same place as the component so it becomes harder to isolate API specific queries and generating code often breaks.
This used to be my previous config:
How can I achieve something similar to the above with the client-preset and recommendations of keeping query at the component level?
Beta Was this translation helpful? Give feedback.
All reactions