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

Syntax error when parsing schemas with types that implement multiple interfaces #15

Closed
nicodn opened this issue May 1, 2019 · 2 comments

Comments

@nicodn
Copy link
Contributor

nicodn commented May 1, 2019

The following schema fails to parse:

interface Node {
  id: ID!
}

interface Object {
  name: String!
  id: ID!
}

type ActualThing implements Object, Node {
  name: String!
  id: ID!
  property: Int!
}

Error:

Syntax Error: Unexpected Name "Node"

GraphQL request (10:37)
 9: 
10: type ActualThing implements Object, Node {
                                        ^
11:   name: String!

    at syntaxError (node_modules/graphql/error/syntaxError.js:24:10)
    at unexpected (node_modules/graphql/language/parser.js:1491:33)
    at parseDefinition (node_modules/graphql/language/parser.js:155:9)
    at many (node_modules/graphql/language/parser.js:1524:16)
    at parseDocument (node_modules/graphql/language/parser.js:115:18)
    at parse (node_modules/graphql/language/parser.js:50:10)
    at schemaParser (node_modules/easygraphql-parser/lib/schemaParser.js:208:24)
@nicodn
Copy link
Contributor Author

nicodn commented May 1, 2019

Found a workaround using { allowLegacySDLImplementsInterfaces: true }

graphql/graphql-js#1169

nicodn added a commit to nicodn/easygraphql-parser that referenced this issue May 1, 2019
@nicodn nicodn mentioned this issue May 1, 2019
estrada9166 pushed a commit that referenced this issue May 2, 2019
@estrada9166
Copy link
Member

@nicodn There is a new version on npm v0.0.9🎉

Thanks for creating the issue and also the PR!

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

2 participants