Directives

@auth

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

Reference: @auth directive

@coalesce

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

Reference: @coalesce

@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

@id

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

Reference: @id

@ignore

The @ignore directive ignores a field, and it will need an alternative mechanism for resolution.

Reference: @ignore

@private

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

Reference: @private Directive

@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

@writeonly

The @writeonly directive marks fields as write-only.

Reference: @writeonly

@alias

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

Reference: @alias

@node

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

Reference: @node