AI answers drawn only from these docs, with links to the pages used.

Common GraphQL Directives

Last updated on October 15, 2026.

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 GraphQL specification defines a small set of built-in directives. These two are used in queries:

  • Only include this field in the result if the argument is .
  • Skip this field if the argument is .

Use this document to guide you in using commonly-used GraphQL directives in Insites.

doc

Code example:

Arguments

include

Directs the executor to include this field or fragment only when the argument is true.

Arguments

Included when true.

skip

Directs the executor to skip this field or fragment when the argument is true.

Arguments

Skipped when true.

deprecated

Marks an element of a GraphQL schema as deprecated.

Arguments

Explains why this element is deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by CommonMark.

specifiedBy

Exposes a URL that specifies the behaviour of this scalar.

Arguments

The URL that specifies the behaviour of this scalar.

Note

This topic is a compilation of knowledge found at Apollo GraphQL and GraphQL.org.

Reference

You may visit the following resources for more information:

Have a suggestion for this page?

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.