Document: Adding custom directives
See original GitHub issueIt is possible to pass custom directives to graphql-core but it’s not documented anywhere. It should be.
from graphql.types.directives import specified_directives # <== default directives
from graphene import Schema
schema = Schema(query=Query, directives=specified_directives + [MyDirective])
@skip
and @include
and defined here: https://github.com/graphql-python/graphql-core/blob/8f7c8f3351dd0a4580b87f293aed7bfcf9126bc4/graphql/type/directives.py#L69-L98
Originally raised in https://github.com/graphql-python/graphene/issues/1006
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:7
Top Results From Across the Web
How to use and create custom directives in Angular
We will create our own custom directives as well. ... Create an app-highlight.directive.ts file in src/app folder and add the code snippet ...
Read more >Creating a Custom Directive • Angular - codecraft.tv
We create a directive by decorating a class with the @Directive decorator. The convention is to associate a directive to an element via...
Read more >Documentation on adding custom directives #446 - GitHub
I'm looking to create a custom directive for my GraphQL server. I want my server to omit certain fields conditionally, based on the...
Read more >How to Create & Use Custom Directive In Angular
The Angular has several built-in attribute directives. Let us create a ttClass directive, which allows us to add class to an element. Similar...
Read more >Walkthrough: Creating a Custom Directive Processor
In this walkthrough, you create a custom directive processor. You add a custom directive that reads an XML file, stores it in an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is it possible that the documentation on writing custom directives is still missing, or I am just unable to find it?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.