graphql-ruby
graphql-ruby copied to clipboard
Directives not respecting warden: Add test failure
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...