@auth/hasura-adapter
Auth.js / NextAuth.js 的官方 Hasura 适配器。
安装
npm install @auth/hasura-adapter格式
const format: {
from: B extends true ? T : null | T;
to: T;
};类型声明
from()
类型参数
| 类型参数 | 值 |
|---|---|
T | - |
B extends boolean | false |
参数
| 参数 | 类型 |
|---|---|
对象? | null | Record<string, any> |
throwIfNullish? | B |
返回值
B extends true ? T : null | T
to()
类型参数
| 类型参数 |
|---|
T |
参数
| 参数 | 类型 |
|---|---|
对象 | Record<string, any> |
返回值
T
HasuraAdapter()
HasuraAdapter(client): Adapter参数
| 参数 | 类型 |
|---|---|
客户端 | HasuraAdapterClient |