Splitting up Query and Mutation in multiple .graphql
files
#798
bartenra
started this conversation in
Show and tell
Replies: 2 comments 2 replies
-
You can also split large type files into small ones using
|
Beta Was this translation helpful? Give feedback.
0 replies
-
We are also working on new API for library that should be more manageable for large schemas, which early version is available here: https://github.com/mirumee/ariadne/tree/new-object-api/ariadne_future |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Our
query.graphql
andmutation.graphql
files were getting a bit unwieldy, so I wrote some code that allows us to split them up.As an example, we can now define a
comments.graphql
with all types and mutations:and for another feature, let's say for user management inside
user.graphql
:Both
Mutation
definitions will be merged in the final schema.Here is the code
SchemaMerger
Here's how we call it:
Hope this is helpful to someone.
Beta Was this translation helpful? Give feedback.
All reactions