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
Uh oh!
There was an error while loading. Please reload this page.
-
Our
query.graphqlandmutation.graphqlfiles 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.graphqlwith all types and mutations:and for another feature, let's say for user management inside
user.graphql:Both
Mutationdefinitions 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