Skip to content

Conversation

@rmosolgo
Copy link
Owner

Fixes #4882

This adds some hiding of directives when their uses are hidden. It only checks "one level" deep. Directives are hidden if:

  • They aren't registered to the schema with directive(...) configurations
  • AND no types with field(...) configurations using the directive are visible
  • AND no resolvers and fields with argument(...) configurations using the directive are visible
  • AND no enums with value(...) configurations using the directive are visible

It doesn't do recursive checking, so if a type is hidden because fields using it are hidden, then the directive will still be visible. Maybe that's possible but I'm guessing that adding visible? implementations to the app is a less complicated solution in that case.

@rmosolgo rmosolgo added this to the 2.4.5 milestone Nov 18, 2024
@rmosolgo rmosolgo merged commit cc66b4a into master Nov 19, 2024
13 of 15 checks passed
@rmosolgo rmosolgo deleted the directive-visibility branch November 19, 2024 18:58
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

Successfully merging this pull request may close these issues.

3 participants