ariadne icon indicating copy to clipboard operation
ariadne copied to clipboard

No Error Raised for Missing directive definition

Open cancan101 opened this issue 5 years ago • 1 comments
trafficstars

I have the following type defs:

type_defs = gql(
    """
    directive @authonly on FIELD_DEFINITION

    type Query {
        hello: String! @authonly,
    }
"""
)

And then when I created and use the schema using (notice the typo in directive name):

schema = make_executable_schema(
    type_defs, [query], directives={'auxthonly': AuthOnlyDirective}
)

no exception raised to indicate that the directive authonly is undefined or that auxthonly is undeclared.

cancan101 avatar Sep 08 '20 18:09 cancan101

I agree, we could raise an error when this happens!

rafalp avatar Jul 05 '21 11:07 rafalp