跳至內容
從 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 适配器選項的介面。

屬性

片段?

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

您可以提供給适配器的 GraphQL 片段,以定義 useraccountsessionverificationToken 實體的形狀。

預設情況下,适配器會使用 預設定義的片段,此設定選項允許擴展它們。

帳戶?
optional Account: string;
會話?
optional Session: string;
使用者?
optional User: string;
驗證令牌?
optional VerificationToken: string;

格式

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

類型宣告

from()

類型參數
類型參數
T
參數
參數類型
物件?Record<string, any>
回傳

null | T


DgraphAdapter()

DgraphAdapter(client, options?): Adapter

參數

參數類型
客戶端DgraphClientParams
選項?DgraphAdapterOptions

回傳

适配器

Auth.js © Balázs Orbán 及團隊 -2024