ariadne
ariadne copied to clipboard
No Error Raised for Missing directive definition
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.
I agree, we could raise an error when this happens!