Index of Directives - Graphql

The list of all directives supported by Dgraph.

@hasInverse

@hasInverse is used to setup up two way edges such that adding a edge in one direction automically adds the one in the inverse direction.

Reference: Linking nodes in the graph

@search

@search allows you to perform filtering on a field while querying for nodes.

Reference: Search

@dgraph

@dgraph directive tells us how to map fields within a type to existing predicates inside Dgraph.

Reference: GraphQL on Existing Dgraph

@id

@id directive is used to annotate a field which represents a unique identifier coming from outside of Dgraph.

Reference: Identity

@withSubscription

@withSubscription directive when applied on a type, generates subsciption queries for it.

Reference: Subscriptions

@secret

TODO - After adding docs for password type.

@auth

@auth allows you to define how to apply authorization rules on the queries/mutation for a type.

Reference: Auth directive

@custom

@custom directive is used to define custom queries, mutations and fields.

Reference: Custom directive

@remote

@remote directive is used to annotate types for which data is not stored in Dgraph. These types are typically used with custom queries and mutations.

Reference: Remote directive

@cascade

@cascade allows you to filter out certain nodes within a query.

Reference: Cascade


This is a companion discussion topic for the original entry at https://dgraph.io/docs/graphql/directives/