Skip to content
New issue

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

Add the ability to specify GraphQLResolveInfo.context type #213

Open
fedirz opened this issue Feb 20, 2024 · 1 comment
Open

Add the ability to specify GraphQLResolveInfo.context type #213

fedirz opened this issue Feb 20, 2024 · 1 comment

Comments

@fedirz
Copy link
Contributor

fedirz commented Feb 20, 2024

Currently, GraphQLResolveInfo.context is being typed as Any, making GraphQLResolveInfo a generic would give users the ability to provide their type. This is already being done in GraphQL.js

export type GraphQLFieldResolver<
  TSource,
  TContext,
  TArgs = any,
  TResult = unknown,
> = (
  source: TSource,
  args: TArgs,
  context: TContext,
  info: GraphQLResolveInfo,
) => TResult;

If this change will be welcome, I'd like to make a pull-request implementing it.

@Cito
Copy link
Member

Cito commented Feb 20, 2024

Sure, PRs of that kind are always welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants