GraphQL directives

Directives define various characteristics of your schema. They can map query or mutation types to resolvers, define how object types are persisted in the database, and specify indexes to use for particular queries.

Every directive name is prefixed with the "at" sign (@). This section describes the directives provided by the Fauna GraphQL API.



Specifies the name of the underlying collection for this Type. Used on top-level object Types.


Specifies that this Type should be embedded as a sub-document in another object Type. This Type exists solely within another top-level object Type and will not be persisted to a collection of its own.


Specifies that the GraphQL API should create CRUD UDFs for annotated Types.


Specifies the name of the underlying index for this field. Used on query Types and individual fields within an object Type.


Declares bi-directional relationships between object Types. Used on fields within object Types.


Specifies a user-defined function for resolving this field. Used within query and mutation Types, but not on object Types.


Specifies the name of an index to enforce a uniqueness constraint. Used on fields within an object Type.