Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prune should remove subfields of @hidden fields #6584

Open
2 tasks
chargePanelAndreas opened this issue Oct 17, 2024 · 1 comment
Open
2 tasks

Prune should remove subfields of @hidden fields #6584

chargePanelAndreas opened this issue Oct 17, 2024 · 1 comment

Comments

@chargePanelAndreas
Copy link

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

  • 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
  • [ x] 3. A local solution has been provided
  • [ x] 4. A pull request is pending review

Describe the bug

When using the Prune utility together with @graphql-mesh/compose-cli any fields that are removed from the schema using the Filter transform is marked with directive @hidden. I noticed that even if the fields did not show up in the resulting introspection, all of the associated (unused) types still appeared in the schema.

To Reproduce Steps to reproduce the behavior:

Mark a field with @hidden. It does nothing when pruning.

Expected behavior

I would like fields that are excluded in the introspection to not have remaining unused types.

Environment:

  • @graphql-tools/utils: 10.5.5
@chargePanelAndreas
Copy link
Author

#6585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant