@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
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;
format
const format: {
from: null | T;
};
Type declaration
from()
Type parameters
Type parameter |
---|
T |
Parameters
Parameter | Type |
---|---|
object ? | Record <string , any > |
Returns
null
| T
DgraphAdapter()
DgraphAdapter(client, options?): Adapter
Parameters
Parameter | Type |
---|---|
client | DgraphClientParams |
options ? | DgraphAdapterOptions |