@graphql-yoga/plugin-jwt
Version: 
jwt plugin for GraphQL Yoga.
14 lines (13 loc) • 387 B
text/typescript
import type { Plugin } from 'graphql-yoga';
import { type JwtPayload } from 'jsonwebtoken';
import { type JwtPluginOptions } from './config.cjs';
export type JWTExtendContextFields = {
    payload: JwtPayload;
    token: {
        value: string;
        prefix?: string;
    };
};
export declare function useJWT(options: JwtPluginOptions): Plugin<{
    jwt?: JWTExtendContextFields;
}>;