naystack - v1.5.10
    Preparing search index...

    Interface AuthorizedContext

    Context for resolvers that require authentication (authorized: true). The userId is guaranteed to be non-null.

    When you set authorized: true on a query() or field(), the resolver's ctx parameter is typed as AuthorizedContext instead of Context, so you can safely access ctx.userId without null checks.

    interface AuthorizedContext {
        isRefreshID?: boolean;
        userId: number;
    }
    Index

    Properties

    Properties

    isRefreshID?: boolean

    true if identified via refresh cookie.

    userId: number

    Authenticated user id (guaranteed non-null).