Directives
The Neo4j GraphQL Library provides the following directives to be used whilst defining types:
Directive | Description |
---|---|
Maps a GraphQL schema field to a Neo4j property on a node or relationship. |
|
Requires authentication checks when accessing the type. |
|
Specifies authorization rules for queries and mutations on the type. |
|
Exposes a mechanism for querying against non-existent, |
|
Specifies that a field is resolved by a custom resolver, and allows the specification of any required fields that is passed as arguments to the custom resolver. |
|
Overrides field resolution (including |
|
Allows for the setting of a default value for a field on object creation. |
|
Defines the filters generated for a field. |
|
Indicates that there should be a fulltext index inserted into the database for the specified Node and its properties. |
|
Marks a field as the unique ID for an object type, and allows for autogeneration of IDs. |
|
Used on nodes to inject values into Cypher |
|
Limits the availability of Mutation operations in the library. |
|
Specifies the configuration of a GraphQL object type which represents a Neo4j node. |
|
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. |
|
Specifies a callback function that gets executed during GraphQL query parsing, to populate fields which have not been provided within the input. |
|
Protects fields which should only be available through the OGM. |
|
Limits the availability of Query operations in the library. |
|
Configure relationships between object types. |
|
|
Required to help you distinguish between interfaces which are used for relationship properties, and otherwise. Can only be used on interfaces, as per its definition:
|
|
Specifies that the field should be used as the global node identifier for Relay. |
Sets the availability of fields on queries and aggregations. |
|
Sets the availability of fields on the create and update inputs. |
|
Limits subscription operations in the library. |
|
|
Specifies authorization rules for subscriptions on the type. |
Flags fields to be used to store timestamps on create/update events. |
|
Indicates that there should be a uniqueness constraint in the database for the fields that it is applied to. |