Closed frankpde closed 3 years ago
That's a great idea but not feasible. For none related models that works but for anything that's related it becomes a nightmare as I have to determine if the related field mutations are already written somewhere. I have enough issues with the core being in a separate file. Happy for you to look into it but no feasible solution comes to mind.
Rather than appending the overall schema.graphql it might make more sense to create individual files for each model (observing also the namespacing for directory creation) and using the
#import path/to/ModelName.graphql
statement.That way the overall filesize on large projects will remain small, with a more readable way of identifying where to make adjustments if necessary.
The overall
Query
can be extended as follows:extend type Query { ... }