graphql-tools
graphql-tools copied to clipboard
Allow using merge directive without keyArg argument if resolver takes 0 arguments
Is your feature request related to a problem? Please describe.
Currently stitchingDirectivesValidator doesn't allow to use @merge directive without keyArg argument if resolver takes 0 arguments.
Describe the solution you'd like
Allow using @merge directive without keyArg argument if resolver takes 0 arguments
Additional context
Allow such use-case will be helpful for situations when there is a global object with fields resolved by different subschemas. An example of such use-case could be some global Stats Object which has different stat fields that are resolved by different subschemas, so there is nothing to pass to the merge resolver