A directive describes additional options to the GraphQL executor. It allows GraphQL to change the result of the query or mutation based on the additional information provided by the directive.

In this section

  • deprecated — Marks an element of a GraphQL schema as no longer supported.

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

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

On this page