How to use user directives?
bronte2k7 opened this issue · comments
bronte2k7 commented
Hi
Most classes have good descriptions and examples. But GraphQLDirective doesn't include any examples. Therefore, there was a difficulty in how to use it?
test = GraphQLDirective(name='test', locations=[DirectiveLocation.QUERY])
schema = GraphQLSchema(query=query, types=[demo_type], directives=[test])
How to apply test directive to query type?
Christoph Zwerschke commented
Hi @bronte2k7
How to apply test directive to query type?
This is deliberately not supported by GraphQL.js (and thus also not by GraphQL-core).
The reasons are explained best in this comment.
bronte2k7 commented
Hi @bronte2k7
How to apply test directive to query type?
This is deliberately not supported by GraphQL.js (and thus also not by GraphQL-core).
The reasons are explained best in this comment.
Thanks for your reply. Сomment helped me)))