Directives

@alias

The @alias directive will map a GraphQL schema field to a Neo4j property on a node or relationship.

Reference: @alias

@auth

The @auth directive is used to define complex fine-grained and role-based access control for object types and fields.

Reference: @auth directive

@callback

The @callback directive is used to specify a function that will be invoked when updating or creating the properties on a node or relationship.

Reference: @callback

@coalesce

The @coalesce directive exposes a mechanism for querying against non-existent, null values on a node.

Reference: @coalesce

@computed

The @computed directive specifies that a field will be resolved by a custom resolver, and allows the specification of any field dependencies.

Reference: @computed

@cypher

The @cypher directive overrides field resolution (including Query and Mutation fields), instead resolving with the specified Cypher.

Reference: @cypher directive

@default

The @default directive allows for the setting of a default value for a field on object creation.

Reference: @default

@exclude

The @exclude directive is used on object types to instruct them to be skipped during Query and Mutation generation.

Reference: @exclude

@fulltext

The @fulltext directive indicates that there should be a Fulltext index inserted into the database for the specified Node and its properties.

Reference: Fulltext indexes

@id

The @id directive marks a field as the unique ID for an object type, and allows for autogeneration of IDs.

Reference: @id

@node

The @node directive is used to specify the configuration of a GraphQL object type which represents a Neo4j node.

Reference: @node

@private

The @private directive protects fields which should only be available through the OGM.

Reference: @private Directive

@queryOptions

The @queryOptions is to be used on nodes, where applied will inject values into a query such as the limit.

Reference: @queryOptions

@readonly

The @readonly directive marks fields as read-only.

Reference: @readonly

@relationship

The @relationship directive is used to configure relationships between object types.

Reference: Relationships

@relationshipProperties

Optional syntactic sugar to help you distinguish between interfaces which are used for relationship properties, and otherwise.

Can only be used on interfaces, as per its definition:

"""Syntactic sugar to help differentiate between interfaces for relationship properties, and otherwise."""
directive @relationshipProperties on INTERFACE

@timestamp

The @timestamp directive flags fields to be used to store timestamps on create/update events.

Reference: @timestamp

@unique

The @unique directive indicates that there should be a uniqueness constraint in the database for the fields that it is applied to.

@writeonly

The @writeonly directive marks fields as write-only.

Reference: @writeonly