Skip to content
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

Cannot use graphqlconfig to read latest graphql syntax correctly #406

Closed
kenNg1 opened this issue Apr 3, 2018 · 0 comments · Fixed by #415
Closed

Cannot use graphqlconfig to read latest graphql syntax correctly #406

kenNg1 opened this issue Apr 3, 2018 · 0 comments · Fixed by #415
Labels
🌹 has-reproduction ❤ Has a reproduction in a codesandbox or single minimal repository

Comments

@kenNg1
Copy link

kenNg1 commented Apr 3, 2018

graphql/graphql-js#1169 From graphql@^0.13.0 We separate multiple inherited interfaces with &. graphql-config@2.0.1 added support of graphql@^0.13.0 but this repository is still using graphql-config@^1.1.1 which makes it unable to read the new syntax e.g.

type Photo implements File & Node {
  id: ID!
  url: URL!
  height: Int!
  width: Int!
  images: [Image]
  caption: String
}

and we will get error like below when we use .graphqlconfig

Syntax Error: Cannot parse the unexpected character "&".

GraphQL request (435:28)
434:
435: type Image implements File & Node {
                                ^
436:   id: ID!

    at syntaxError (/Users/kenng/.nvm/versions/node/v9.10.1/lib/node_modules/apollo-codegen/node_modules/graphql-config/node_modules/graphql/error/syntaxError.js:24:10)
    at readToken (/Users/kenng/.nvm/versions/node/v9.10.1/lib/node_modules/apollo-codegen/node_modules/graphql-config/node_modules/graphql/language/lexer.js:316:32)
    at Object.lookahead (/Users/kenng/.nvm/versions/node/v9.10.1/lib/node_modules/apollo-codegen/node_modules/graphql-config/node_modules/graphql/language/lexer.js:61:43)
    at Object.advanceLexer [as advance] (/Users/kenng/.nvm/versions/node/v9.10.1/lib/node_modules/apollo-codegen/node_modules/graphql-config/node_modules/graphql/language/lexer.js:52:33)
    at expect (/Users/kenng/.nvm/versions/node/v9.10.1/lib/node_modules/apollo-codegen/node_modules/graphql-config/node_modules/graphql/language/parser.js:1286:11)
    at parseName (/Users/kenng/.nvm/versions/node/v9.10.1/lib/node_modules/apollo-codegen/node_modules/graphql-config/node_modules/graphql/language/parser.js:92:15)
    at parseNamedType (/Users/kenng/.nvm/versions/node/v9.10.1/lib/node_modules/apollo-codegen/node_modules/graphql-config/node_modules/graphql/language/parser.js:630:11)
    at parseImplementsInterfaces (/Users/kenng/.nvm/versions/node/v9.10.1/lib/node_modules/apollo-codegen/node_modules/graphql-config/node_modules/graphql/language/parser.js:777:18)
    at parseObjectTypeDefinition (/Users/kenng/.nvm/versions/node/v9.10.1/lib/node_modules/apollo-codegen/node_modules/graphql-config/node_modules/graphql/language/parser.js:755:20)
    at parseTypeSystemDefinition (/Users/kenng/.nvm/versions/node/v9.10.1/lib/node_modules/apollo-codegen/node_modules/graphql-config/node_modules/graphql/language/parser.js:663:16)

Please consider upgrading the graphqlconfig dependency to ^2.0.1 thanks.

@ghost ghost added the 🌹 has-reproduction ❤ Has a reproduction in a codesandbox or single minimal repository label Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌹 has-reproduction ❤ Has a reproduction in a codesandbox or single minimal repository
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant