You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox
> Make sure to fork this template and run yarn generate in the terminal.
>
> Please make sure the GraphQL Tools package versions under package.json matches yours.
2. A failing test has been provided
3. A local solution has been provided
4. A pull request is pending review
Describe the bug
When I use directive on the root field, the @graphql-tools/delegate loses directive on subschema request.
To Reproduce Steps to reproduce the behavior:
Make schema with custom directive on FIELD and query with root field.
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
> Make sure to fork this template and run
yarn generate
in the terminal.>
> Please make sure the GraphQL Tools package versions under
package.json
matches yours.Describe the bug
When I use directive on the root field, the @graphql-tools/delegate loses directive on subschema request.
To Reproduce Steps to reproduce the behavior:
Try online
https://codesandbox.io/p/devbox/stitching-directives-vvp6xj
Expected behavior
There is a directive on the request, as well as on the original request.
Environment:
@graphql-tools/delegate
: 10.0.11My solution
Add to object rootfieldNode in @graphql-tools/delegate/cjs/createRequest.js
directives: fieldNodes?.[0]?.directives
to pass directives to new request.Additional context
I am not sure enough, but maybe mergedOperationDefinition also requires directives support for operations?
The text was updated successfully, but these errors were encountered: