-
Notifications
You must be signed in to change notification settings - Fork 233
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
Doesn't work with graphql v16+ #628
Comments
Seems about right, we have not updated to GraphQL v16 yet. |
Would you like to send a Pull Request to address this issue? |
Hi @Manubi , the PR seems to be failing because of this: npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from graphql-middleware@6.1.12
npm ERR! node_modules/graphql-middleware graphql-middleware (Mercurius dev dependency) has peer dependency on graphql < 16, so it needs to be upgraded too. |
We can actually remove that dependency and add the relative example: https://github.com/mercurius-js/mercurius/blob/b671de31178395ea53f2ea39c19cc3f8d80be8eb/examples/graphql-shield-authorization.js. |
Thanks @mcollina , I'll look into that. |
Any updates on this? |
Would you like to work on it? |
Yes, on the next week I will have some capacity to fix this, but don’t want to interrupt someone’s existing work. |
Go for it! |
Sorry, I can't help with this at the moment |
Hi,
just wanted to update the graphql package to version 16 but fastify/mercurius doesn't seem to like it.
No overload matches this call. Overload 1 of 3, '(plugin: FastifyPluginCallback<MercuriusOptions, Server>, opts?: FastifyRegisterOptions<MercuriusOptions> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. Type 'NexusGraphQLSchema' is not assignable to type 'string | GraphQLSchema | string[] | undefined'. Property 'isPossibleType' is missing in type 'NexusGraphQLSchema' but required in type 'GraphQLSchema'. Overload 2 of 3, '(plugin: FastifyPluginAsync<MercuriusOptions, Server>, opts?: FastifyRegisterOptions<MercuriusOptions> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. Argument of type 'typeof mercurius' is not assignable to parameter of type 'FastifyPluginAsync<MercuriusOptions, Server>'. Type 'void' is not assignable to type 'Promise<void>'. Overload 3 of 3, '(plugin: FastifyPluginCallback<MercuriusOptions, Server> | FastifyPluginAsync<MercuriusOptions, Server> | Promise<...> | Promise<...>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. Type 'NexusGraphQLSchema' is not assignable to type 'string | GraphQLSchema | string[] | undefined'.ts(2769) schema.d.ts(83, 3): 'isPossibleType' is declared here.
Thanks for your help!
The text was updated successfully, but these errors were encountered: