graphql-ruby icon indicating copy to clipboard operation
graphql-ruby copied to clipboard

Directives not respecting warden: Add test failure

Open tjoyal opened this issue 11 months ago • 0 comments

This test fails.

# Failure:
# GraphQL::Schema::Warden::hiding fields#test_0003_hides directives if no other fields are using it
# Minitest::Assertion: --- expected
# +++ actual
# @@ -1 +1 @@
# -["include", "skip", "deprecated", "oneOf", "specifiedBy"]
# +["include", "skip", "deprecated", "oneOf", "specifiedBy", "cheremeDirectives"]

I believe that an "unused directive" shouldn't be added to the schema, similar to how it's done for unused (invisible) types.

Is this indeed the desired behavior as I'm assuming it should be?

I'm not sure I have the right expertise in the gem internals to propose an appropriate fix...

tjoyal avatar Mar 12 '24 15:03 tjoyal