Skip to content

Parsing error was not very useful #798

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

Closed
jay-jlm opened this issue Apr 11, 2017 · 3 comments
Closed

Parsing error was not very useful #798

jay-jlm opened this issue Apr 11, 2017 · 3 comments

Comments

@jay-jlm
Copy link

jay-jlm commented Apr 11, 2017

Hi,

I got the error below, which lookes to me like graphql was trying to output a useful parsing error but failed to do so.
After a lot of trial and error I eventually narrowed it down to being a mutation declaration that did not specify any parameters

/Users/joao/node_projects/my-server/node_modules/graphql/error/syntaxError.js:28 var error = new _GraphQLError.GraphQLError('Syntax Error ' + source.name + ' (' + location.line + ':' + location.column + ') ' + description + '\n\n' + highlightSourceAtLocation(source, location), undefined, source, [position]); ^ GraphQLError at syntaxError (/Users/joao/node_projects/my-server/node_modules/graphql/error/syntaxError.js:28:15) at expect (/Users/joao/node_projects/my-server/node_modules/graphql/language/parser.js:966:32) at parseName (/Users/joao/node_projects/my-server/node_modules/graphql/language/parser.js:88:15) at parseInputValueDef (/Users/joao/node_projects/my-server/node_modules/graphql/language/parser.js:743:14) at many (/Users/joao/node_projects/my-server/node_modules/graphql/language/parser.js:1015:16) at parseArgumentDefs (/Users/joao/node_projects/my-server/node_modules/graphql/language/parser.js:735:10) at parseFieldDefinition (/Users/joao/node_projects/my-server/node_modules/graphql/language/parser.js:714:14) at any (/Users/joao/node_projects/my-server/node_modules/graphql/language/parser.js:1002:16) at parseObjectTypeDefinition (/Users/joao/node_projects/my-server/node_modules/graphql/language/parser.js:683:16) at parseTypeSystemDefinition (/Users/joao/node_projects/my-server/node_modules/graphql/language/parser.js:607:16)

I wonder if this could be improved somehow to provide a better debugging experience, thanks!

@jay-jlm jay-jlm changed the title Parsing error was not not very useful Parsing error was not very useful Apr 11, 2017
@wincent
Copy link
Contributor

wincent commented Apr 11, 2017

That is indeed not very useful. How were you invoking the parser to obtain this output?

@jay-jlm
Copy link
Author

jay-jlm commented Apr 11, 2017

Thanks for responding.
I was running a Node (FeathersJS) server.

@leebyron
Copy link
Contributor

Should be fixed by #718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants