naystack - v1.5.10
    Preparing search index...

    Function tokenContext

    • Builds the Apollo link context so requests include the user's Bearer token. Used internally by useAuthQuery / useAuthMutation; you typically don't call this directly.

      Parameters

      • Optionaltoken: string | null

        The JWT access token. If null/undefined, returns undefined (no auth header).

      Returns { credentials: string; headers: { authorization: string } } | undefined

      Context object with headers.authorization and credentials: 'omit', or undefined if no token.