コンテンツへスキップ
NextAuth.js v4からの移行?こちらを ご確認ください。.
APIリファレンス@auth/dgraph-adapter

@auth/dgraph-adapter

Auth.js / NextAuth.js の公式 Dgraph アダプター。

インストール

npm install next-auth @auth/dgraph-adapter

DgraphClientError

再エクスポート DgraphClientError

DgraphClientParams

再エクスポート DgraphClientParams

DgraphAdapterOptions

これはDgraphアダプターオプションのインターフェースです。

プロパティ

fragments?

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

アダプターに渡すことができるGraphQLのフラグメントで、useraccountsessionverificationTokenエンティティの形状を定義します。

デフォルトでは、アダプターはデフォルトで定義されたフラグメントを使用します。この設定オプションを使用すると、それらを拡張できます。

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

format

const format: {
  from: null | T;
};

型宣言

from()

型パラメーター
型パラメーター
T
パラメーター
パラメーター
オブジェクト?Record<string, any>
戻り値

null | T


DgraphAdapter()

DgraphAdapter(client, options?): Adapter

パラメーター

パラメーター
クライアントDgraphClientParams
options?DgraphAdapterOptions

戻り値

アダプター

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