graphql-core-legacy icon indicating copy to clipboard operation
graphql-core-legacy copied to clipboard

Help with custom Directives

Open eamigo86 opened this issue 6 years ago • 2 comments

Hello to the community, I would like to know if it is not possible to define custom directives, according to the documentation of the GraphQLSchema class if possible, by explicitly declaring them in the schema constructor like this:

MyAppSchema = GraphQLSchema(
      ...
      directives=specified_directives.extend([MyCustomerDirective]),
)

eamigo86 avatar Dec 08 '17 21:12 eamigo86

@eamigo86 it is possible: test-example

However, I'm not sure if you're able to make use of them when defining a schema (a schema directive), or if they're only supported client only.

dfee avatar Mar 20 '18 18:03 dfee

Hello @dfee, thanks for your answer. I have already implemented a customized package to extend the graphene-django functionalities in which I implemented some predetermined directives.

eamigo86 avatar Mar 20 '18 19:03 eamigo86