question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incompatibility with apollo-server ^2.2.0

See original GitHub issue

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 : https://github.com/apollographql/apollo-server/issues/1935#issuecomment-438210375

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 : https://github.com/apollographql/apollo-server/issues/1934

In the meantime, the last working version is apollo-server@2.0.5

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:20
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
schicklingcommented, Dec 18, 2018

🎉 This issue has been resolved in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

6reactions
dortamiguelcommented, Dec 18, 2018

@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”,

(node:38309) UnhandledPromiseRejectionWarning: Error: The introspection query is resolving asynchronously; execution of an introspection query is not expected to return a `Promise`.

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 })
  });
Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction to Apollo Server - Apollo GraphQL Docs
Incremental adoption, enabling you to add features as they're needed; Universal compatibility with any data source, any build tool, and any GraphQL client...
Read more >
Unable to use applyMiddleware (from graphql-middleware ...
With a minimum graphql server with express, apollo-server 2.2.0 throws Error: Unable to generate server introspection document. while trying ...
Read more >
apollo-server versions and peer dependencies
Online Peer dependency version tool to search for compatible versions of related NPM packages.
Read more >
apollo-server-express - npm
This is the Express integration of Apollo Server. Apollo Server is a community-maintained open-source GraphQL server that works with many Node. ...
Read more >
@apollographql/graphql-upload-8-fork - Package Manager
... that works with graphql@15 for compatibility with apollo-server@2 ... Apollo Server v2 depends on graphql-upload to provide an easy-to-use way to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found