I was looking at the documentation of graphql-tools, and wanted to know if we can use declarative programming model to delegate queries or mutations to sub-schemas?
https://www.graphql-tools.com/docs/schema-delegation
Specially the delegateToSchema type of call, can this done through SDL using directives?
Yes, it's possible. You can use the
@delegate
directive to delegate your query to the appropriate schema.The sample below assumes you are querying for a customer. In your SDL, you might add: