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: Cannot parse the unexpected character "&". #115

Open
josephktcheung opened this issue Mar 16, 2018 · 5 comments
Open

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

josephktcheung opened this issue Mar 16, 2018 · 5 comments
Milestone

Comments

@josephktcheung
Copy link

Hi,

Related to graphql/graphql-js#1169, I'm using graphql 0.13.1 and I have a type which implements multiple interfaces:

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

And it shows [graphql] Syntax Error: Cannot parse the unexpected character "&". when I turn on graphql for VSCode.

Best,
Joseph

@ajhyndman
Copy link

ajhyndman commented Mar 19, 2018

Yeah, I'm seeing this too now.

This will be because the version of GraphQL is locked to an old version (0.9.3) and in the most recent versions, this syntax was changed.

See also #111

Mayank1791989 added a commit that referenced this issue Apr 18, 2018
BREAKING_CHANGE: structure of .gqlconfig file changed.

closes #3, closes #23, closes #28, closes #45, closes #52, closes #62, closes #99, closes #100, closes #115
Mayank1791989 added a commit that referenced this issue Apr 30, 2018
BREAKING_CHANGE: structure of .gqlconfig file changed.

closes #3, closes #23, closes #28, closes #45, closes #52, closes #62, closes #99, closes #100, closes #115
@Mayank1791989 Mayank1791989 added this to the v3 milestone Jul 29, 2018
@danielkcz
Copy link

@Mayank1791989 Please, is there some workaround for this? It basically breaks whole thing because it fails to parse schema and all benefits of this are gone.

@matt-senseye
Copy link

Is there any update on this issue? As @FredyC points out this renders the entire thing useless if your schema happens to make use of any types that implement multiple interfaces, so it's pretty high impact.

@danielkcz
Copy link

@matt-senseye I highly recommend you to look at Apollo GraphQL extension that works nicely. This one seems dead.

@matt-senseye
Copy link

@FredyC thanks for the recommendation, the Apollo GraphQL extension is working so I've swapped to that 👍

For the benefit of anyone needing to make the same jump, I didn't find it immediately obvious from the docs how to configure it without using Apollo Engine/Graph Manager, but it worked with the config below:

// apollo.config.js
module.exports = {
  client: {
    service: {
      name: 'Local GraphQL Schema',
      localSchemaFile: "src/generated/schema.graphql"
    },
    includes: [
      "src/app/**/*.{ts,tsx,js,jsx,graphql}"
    ]
  }
};

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

5 participants