Dgraph Dgraph
Dgraph DB GraphQL Ratel UI Tutorials
  • GraphQL API
    • Quick Start
    • GraphQL Client
      • /graphql endpoint
        • POST Request
        • GET Request
        • HTTP Response
      • GraphQL IDEs
      • Client libraries
    • Schema
      • Types
      • Relationships
      • Reserved Names
      • Directives
        • @auth
        • @embedding
        • @deprecated
        • @dgraph
        • @id
        • Search and Filtering
        • @generate
        • @withSubscription
      • Schema Migration
      • Documentation and Comments
      • Dgraph Schema Fragment
    • Security
      • Handle JWT Token
      • RBAC rules
      • ABAC rules
      • Mutations
      • Restrict origins
      • Authorization tips
    • Queries
      • Overview
      • Search and Filtering
      • Similarity Search
      • Aggregate Queries
      • Persistent Queries
      • And, Or and Not
      • Cached Results
      • Order and Pagination
      • @cascade Directive
      • @skip and @include Directives
    • Mutations
      • Overview
      • Add
      • Upsert
      • Update
      • Delete
      • Deep
    • Subscriptions
    • Custom Resolvers
      • Overview
      • The @custom Directive
      • Custom Queries
      • Custom Mutations
      • Custom Fields
      • Custom DQL
    • Lambda Resolvers
      • Overview
      • field
      • Lambda Queries
      • Lambda Mutations
      • Lambda Webhooks
    • Administrative API
    • Apollo Federation
  • GraphQL - DQL interoperability
    • GraphQL and DQL schemas
    • Data loading
    • Use DQL in GraphQL
    • GraphQL data migration
    • GraphQL on Existing Dgraph

@auth

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

Refer to graphql endpoint security, RBAC rules and Graph traversal rules for details.

@auth directive is not supported on union and @remote types.

Ask a Question Edit the page Report an issue

All rights reserved © 2023 Dgraph

Close