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

@auth/hasura-adapter

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

Installation

npm install @auth/hasura-adapter

format

const format: {
  from: B extends true ? T : null | T;
  to: T;
};

Type declaration

from()

Type parameters
Type parameterValue
T-
B extends booleanfalse
Parameters
ParameterType
object?null | Record<string, any>
throwIfNullish?B
Returns

B extends true ? T : null | T

to()

Type parameters
Type parameter
T
Parameters
ParameterType
objectRecord<string, any>
Returns

T


HasuraAdapter()

HasuraAdapter(client): Adapter

Parameters

ParameterType
clientHasuraAdapterClient

Returns

Adapter

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