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

Typescript error in plugin.d.ts for composeMiddlewareFns #1073

Closed
grafficmedia opened this issue Apr 8, 2022 · 1 comment · May be fixed by #1077
Closed

Typescript error in plugin.d.ts for composeMiddlewareFns #1073

grafficmedia opened this issue Apr 8, 2022 · 1 comment · May be fixed by #1077

Comments

@grafficmedia
Copy link

grafficmedia commented Apr 8, 2022

Fresh install of nexus, and I'm getting a typescript error in the plugin.d.ts file within the nexus package.

Offending code:
export declare function composeMiddlewareFns<T>(middlewareFns: MiddlewareFn[], resolver: GraphQLFieldResolver<any, any>): GraphQLFieldResolver<any, any, any, unknown>;

typescript error:
node_modules/nexus/dist/plugin.d.ts(114,123): error TS2707: Generic type 'GraphQLFieldResolver' requires between 2 and 3 type arguments.

@santialbo
Copy link
Contributor

The problem will go away if you use graphql 16.
Graphql 16 added a fourth generic parameter which plugin.d.ts shouldn't be using if they want nexus to stay v15 compatible.

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

Successfully merging a pull request may close this issue.

2 participants