Graphql-js: TypeError: Must provide Source. Received: undefined

Created on 15 Sep 2017  路  4Comments  路  Source: graphql/graphql-js

Trying to figure out the source of this error - can use some help:

TypeError: Must provide Source. Received: undefined
[1]          at parse (/home/henry/Documents/alexa/alexa-listener/node_modules/graphql/language/parser.js:43:11)
[1]          at /home/henry/Documents/alexa/alexa-listener/node_modules/graphql/graphql.js:66:36
[1]          at Promise (<anonymous>)
[1]          at graphqlImpl (/home/henry/Documents/alexa/alexa-listener/node_modules/graphql/graphql.js:62:10)
[1]          at Object.graphql (/home/henry/Documents/alexa/alexa-listener/node_modules/graphql/graphql.js:50:148)

What exactly does it mean?

Using [email protected]

Most helpful comment

@IvanGoncharov Thanks for the information. It's a bit weird because the documentation is out of date and specifies requestString to be used but no mention of source and it's the reverse for the source code.

cf: http://graphql.org/graphql-js/graphql/#graphql

All 4 comments

@henry74 It means that you forget to pass source argument see here:
https://github.com/graphql/graphql-js/blob/master/src/graphql.js#L32-L33

P.S. it's better to ask such question on StackOverflow or in Slack https://graphql-slack.herokuapp.com/

@IvanGoncharov Thank you - very helpful. At least points me in the right direction. Strange previous code I wrote worked fine and reusing it in a new application was creating this error. I'll take it to slack/stackoverflow! Thanks.

@IvanGoncharov Thanks for the information. It's a bit weird because the documentation is out of date and specifies requestString to be used but no mention of source and it's the reverse for the source code.

cf: http://graphql.org/graphql-js/graphql/#graphql

@Mickael-van-der-Beek Sadly documentation for graphql-js is severely outdated 馃槶
If you have time, you can help out by making PRs with corrections:
https://github.com/graphql/graphql.github.io/blob/source/site/graphql-js/APIReference-GraphQL.md

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davide-ganito picture davide-ganito  路  4Comments

galki picture galki  路  3Comments

closertb picture closertb  路  3Comments

hekike picture hekike  路  4Comments

adriano-di-giovanni picture adriano-di-giovanni  路  3Comments