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 has been deprecated and will be removed in version 4.0. Please use the @populatedBy directive instead.

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 has been deprecated and will be removed in version 4.0. Please use the @customResolver directive instead.

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

Reference: @computed

@customResolver

The @customResolver directive specifies that a field will be resolved by a custom resolver, and allows the specification of any required fields that will be passed as arguments to the custom resolver.

Reference: @customResolver

@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, Mutation and Subscription 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 plural argument of the @node directive has been deprecated and will be removed in version 4.0. Please use the @plural directive instead.

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

Reference: @node

@plural

The @plural directive redefines how to compose the plural of the type for the generated operations. This is particularly useful for types that are not correctly pluralized or are non-English words.

Reference: @plural

@populatedBy

The @populatedBy directive is used to specify a callback function that gets executed during GraphQL query parsing, to populate fields which have not been provided within the input.

Reference: @populatedBy

@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