howtographql / graphql-js

https://www.howtographql.com/graphql-js/1-getting-started/
363 stars 124 forks source link

Graphql-js tutorial mutation './src/schema.graphql' #66

Open tuscanlabs opened 5 years ago

tuscanlabs commented 5 years ago

Following the tutorial, a simple mutation, I am getting error at './src/schema.graphql'. I am using node version v11.1.0

/Users/raghu/Documents/hackernews-node/node_modules/graphql/language/lexer.js:280 throw (0, _syntaxError.syntaxError)(source, pos, unexpectedCharacterMessage(code)); ^ GraphQLError: Syntax Error: Cannot parse the unexpected character "/". at syntaxError (/Users/raghu/Documents/hackernews-node/node_modules/graphql/error/syntaxError.js:15:10) at readToken (/Users/raghu/Documents/hackernews-node/node_modules/graphql/language/lexer.js:280:38) at Object.lookahead (/Users/raghu/Documents/hackernews-node/node_modules/graphql/language/lexer.js:55:43) at Object.advanceLexer [as advance] (/Users/raghu/Documents/hackernews-node/node_modules/graphql/language/lexer.js:45:33) at expectOptionalToken (/Users/raghu/Documents/hackernews-node/node_modules/graphql/language/parser.js:1440:11) at many (/Users/raghu/Documents/hackernews-node/node_modules/graphql/language/parser.js:1517:11) at parseFieldsDefinition (/Users/raghu/Documents/hackernews-node/node_modules/graphql/language/parser.js:852:54) at parseObjectTypeDefinition (/Users/raghu/Documents/hackernews-node/node_modules/graphql/language/parser.js:806:16) at parseTypeSystemDefinition (/Users/raghu/Documents/hackernews-node/node_modules/graphql/language/parser.js:704:16) at parseDefinition (/Users/raghu/Documents/hackernews-node/node_modules/graphql/language/parser.js:137:16)