ardatan / graphql-mesh

🕸️ GraphQL Federation Framework for any API services such as REST, OpenAPI, Swagger, SOAP, gRPC and more...
https://the-guild.dev/graphql/mesh
MIT License
3.3k stars 347 forks source link

Prune should remove subfields of @hidden fields #7989

Open chargePanelAndreas opened 1 month ago

chargePanelAndreas commented 1 month ago

Issue workflow progress

Progress of the issue based on the Contributor Workflow


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:

chargePanelAndreas commented 1 month ago

https://github.com/ardatan/graphql-tools/pull/6585