Skip to content
Migrating from NextAuth.js v4? Read our migration guide.
API reference
@auth/dgraph-adapter

@auth/dgraph-adapter

Official Dgraph adapter for Auth.js / NextAuth.js.

Installation

npm install next-auth @auth/dgraph-adapter

DgraphClientError

Re-exports DgraphClientError

DgraphClientParams

Re-exports DgraphClientParams

format

Re-exports format

DgraphAdapterOptions

This is the interface of the Dgraph adapter options.

Properties

fragments?

optional fragments: {
  Account: string;
  Session: string;
  User: string;
  VerificationToken: string;
};

The GraphQL Fragments you can supply to the adapter to define how the shapes of the user, account, session, verificationToken entities look.

By default the adapter will uses the default defined fragments , this config option allows to extend them.

Account?
optional Account: string;
Session?
optional Session: string;
User?
optional User: string;
VerificationToken?
optional VerificationToken: string;

DgraphAdapter()

DgraphAdapter(client, options?): Adapter

Parameters

ParameterType
clientDgraphClientParams
options?DgraphAdapterOptions

Returns

Adapter

Auth.js © Balázs Orbán and Team - 2024