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.
Directives
@collection
|
Specifies the name of the underlying collection for this Type. Used on top-level object Types. |
@embedded
|
Specifies that this Type should be embedded as a sub-document in another
|
@generateUDFResolvers
|
Specifies that the GraphQL API should create CRUD UDFs for annotated Types. |
@index
|
Specifies the name of the underlying index for this field. Used on |
@relation
|
Declares bi-directional relationships between |
@resolver
|
Specifies a user-defined function for resolving this field. Used within
|
@unique
|
Specifies the name of an index to enforce a uniqueness constraint.
Used on fields within an |