-
Notifications
You must be signed in to change notification settings - Fork 58
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
Incompatibility with apollo-server ^2.2.0 #75
Comments
yap, had this issue as well after update my |
I'm curious if anyone experiencing this problem (and has a reproduction) would be willing to try modifying Essentially, this incompatibility is occurring because the expectation Apollo Server (now) makes about introspection queries is that they should resolve synchronously (as in, they should not have asynchronous properties or resolvers). This is an expectation seems to be corroborated by My claim is that that predicate should be applied prior to wrapping a resolver to maintain the synchronous execution dynamics of introspection queries. |
The same issue is unfortunately present when used with apollo-server-azure-functions. Although in my case I can't find an appropriate version of apollo-server-azure-functions to roll back to :( |
I have also this problem whit graphql-shield |
@ellipticaldoor There is a temporary (but not very nice) solution which appears to allow "apollo-server-azure-functions": "2.2.6", "graphql-middleware": "^2.0.2" and "graphql-shield": "^4.1.0" work alongside each other. Following this issue comment apollographql/apollo-server#1935 (comment) I was able to patch the apollo-server-core dependency in my solution and it now works |
I think I will wait for a better fix :/ |
🎉 This issue has been resolved in version 3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@schickling Can we reopen this issue? I still get the following error using "graphql-middleware": "^3.0.0" with "apollo-server-express": "2.3.1",
This is how I use it const typeDefs = importSchema("./src/schema.graphql");
const schema = makeExecutableSchema({ typeDefs, resolvers });
const schemaWithMiddleware = applyMiddleware(schema, permissions);
const apollo = new ApolloServer({
schema: schemaWithMiddleware,
resolvers,
context: (ctx) => ({ ...ctx, db })
}); |
@ellipticaldoor I'm using graphql-shield v5 seems to be working now. |
I can also confirm that with the latest version it works nicely again :) |
Hello,
It seems that there is an incompatibility issue between graphql-middleware and apollo-server@^2.2.0
Here you can find an explanation about what is breaking : apollographql/apollo-server#1935 (comment)
So apparently something in graphql-middleware is turning the introspection query execution (from
graphql/execution
into a Promise instead of returning an object.Another related issue : apollographql/apollo-server#1934
In the meantime, the last working version is apollo-server@2.0.5
The text was updated successfully, but these errors were encountered: