-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Unable to use applyMiddleware (from graphql-middleware) after upgrading to 2.2.0 #1934
Comments
Same problem. Pinned version "apollo-server": "2.0.5" works great |
Same problem, but I don't use middlewares. The problem seems to be that the result of |
Running into this as well |
I am having the same issue, had to downgrade. Any ideas why is this happening? |
It is even more weird that, even if I only declare the middleware but not using it in initializing the server, it still shows the error. Any clue? |
@juank11memphis @hinsxd see #1935 . You can go back to v2.0.5 in the meantime. |
Same problem here thanks for the info @wmertens |
Confirmed I'm hitting this too as a result from a promise being rerturned in |
Yep, I have the same error |
I tried using version 2.2.1 thinking the problem was going to be fixed, but I am still getting the same error. This should not be a version with breaking changes, I would expect just to update the version and everything to keep working as before... |
Version 2.2.2 still not working, it just shows kind of a better error but not good enough to understand what do we need to do to fix this, and still this is not supposed to be a version with breaking changes, and if it is, a little guide would be more than appreciated. |
I think the error comes from here https://github.com/apollographql/apollo-server/blob/master/packages/apollo-server-core/src/utils/schemaHash.ts#L23 Though, Im not sure what I'm doing wrong, is this type checking my typescript code on execution? |
Closing as a duplicate of #1935. I've responded over there as to the problem, but the short explanation is that the execution of an introspection query, which is not supposed to run asynchronously. The situation occurring here is that resolvers are being wrapped in a way which doesn't maintain their original execution dynamics, thus violating this assumption. See related: graphql/graphql-js#1120. |
With a minimum graphql server with express, apollo-server 2.2.0 throws
Error: Unable to generate server introspection document.
while trying to apply middleware (graphql-shield
) on the server withgraphql-middleware
which gives the following error:
The text was updated successfully, but these errors were encountered: