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
The scalar _FieldSet is removed from directive definition.
It's not breaking client because the graphql tool selectively prune unused types from a schema, but it removes parameter from directive definition. In this case, when the schema didn't use a directive, it will remove scalar _FieldSet from directive.
Removing directive's parameter alters its definition, and these fields: _FieldSet! is required for the directive. I think we should either keep the fields: _FieldSet! or remove directive completely so the definition remains correct in schema.
Issue workflow progress
Progress of the issue based on the Contributor Workflow
Describe the bug
The
scalar _FieldSet
is removed from directive definition.It's not breaking client because the graphql tool selectively prune unused types from a schema, but it removes parameter from directive definition. In this case, when the schema didn't use a directive, it will remove
scalar _FieldSet
from directive.Removing directive's parameter alters its definition, and these
fields: _FieldSet!
is required for the directive. I think we should either keep thefields: _FieldSet!
or remove directive completely so the definition remains correct in schema.To Reproduce
Codesandbox link
Expected behavior
Do not remove types used in directive definition
Environment:
@graphql-tools/utils
: 9.1.4Additional context
The text was updated successfully, but these errors were encountered: