A directive allows a user to decorate part of a GraphQL schema or operation with additional configurations. They can be useful to get out of situations where a user otherwise would need to do string manipulation to add and remove fields in a query. Server implementations may also add experimental features by defining completely new directives. The core GraphQL specification includes exactly two directives, which must be supported by any spec-compliant GraphQL server implementation:
Use this document to guide you in using commonly-used GraphQL directives in Insites.
Code example:
Arguments
Directs the executor to include this field or fragment only when the
Arguments
Included when true.
Directs the executor to skip this field or fragment when the
Arguments
Skipped when true.
Marks an element of a GraphQL schema as 'no longer supported.'
Arguments
Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by CommonMark.
Exposes a URL that specifies the behaviour of this scalar.
Arguments
The URL that specifies the behaviour of this scalar.
This topic is a compilation of knowledge found at Apollo GraphQL and GraphQL.org.
You may visit the following resources for more information:
Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.