We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JWTExtendContextFields
Hi!
I have a yoga subgraph. I decode JWT payload from the gateway, and the subgraph consumes it as context.
import { YogaInitialContext } from 'graphql-yoga' import { JWTExtendContextFields } from '@graphql-hive/gateway' export interface GraphQLContext extends YogaInitialContext { jwt: JWTExtendContextFields }
And JWTExtendContextFields is declared like this.
export type JWTExtendContextFields = { payload: JwtPayload; token: { value: string; prefix?: string; }; };
The problem is that JwtPayload is fixed. So I cannot extend it to contain my own payload properties. It should be conceptually like this.
JwtPayload
export type JWTExtendContextFields<T = {}> = { payload: JwtPayload<T>; token: { value: string; prefix?: string; }; };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi!
I have a yoga subgraph.
I decode JWT payload from the gateway, and the subgraph consumes it as context.
And
JWTExtendContextFields
is declared like this.The problem is that
JwtPayload
is fixed.So I cannot extend it to contain my own payload properties.
It should be conceptually like this.
The text was updated successfully, but these errors were encountered: