The end-to-end example showed in the documentation doesn't work.
If I run any query I get this error
{
"errors": [
{
"message": "graphql_1.execute(...).then is not a function"
}
]
}
STEPS TO REPRODUCE:
POSSIBLE REASON
Implementing resolvers as promises solves the issue, but that's not a good solution, because I cannot reimplement the introspection query
@ZaninAndrea You'd have to use graphql version 0.11.7 or earlier. Graphql released new version which is causing this issue
Thanks a lot, maybe it's worth changing the install script in the example to
npm install --save apollo-server-express graphql-tools [email protected] express body-parser
Glad to help. BTW issue already open #718 :)
I believe this has been fixed in 1.3.1.
I get this exact problem with apollo-server-koa 1.3.2.
Getting all tools (server, client, codegen etc.) to agree on a singular version of the graphql package is difficult but necessary as it has classes that are checked with instanceof. So it would be nice if more versions of the graphql package could be supported in apollo-server.
Upgraded graphql-tools to 2.16.0 and now it works :-).
Thanks salhotra, i was stuck for almost 4 hours on this problem