Graphiql: GraphQL 14 Support

Created on 29 Jun 2018  ยท  21Comments  ยท  Source: graphql/graphiql

Since GraphQL 0.14 is around the corner. Creating an issue to track its support.

I can take up the implementation part as I am maintaining the vscode-graphql extension and we have some issues regarding this change already.

Do any of the maintainers have any comments on this before I start to work on it? Thanks.

language-services

Most helpful comment

@AGS- : Sure! please let me know if there is any action item for me.

All 21 comments

@divyenduz, I need to speak to everyone else working on graphql before we update to 0.14.x just to make sure we are on the same page, since I'm no longer on the GraphQL team. I did upgrade to 0.13.x recently and I'm running into some issues with tests passing, I noticed these tests also fail on 0.14.x, so if we could get that resolved it would give us a great head start on upgrading to 0.14.

Alright, the test issue was resolved in #254.

@AGS- : Sure! please let me know if there is any action item for me.

Anything happening here?

Seems like the update happened but no new release. Could we please have a release with 14.0.0 peer dependency support?

EDIT: Actually, not all packages has 14.0.0 as peer dep in their package.json yet!

When installing graphiql I currently get a lot of warnings from these packages about graphql 14.0.0, would be nice to get rid of them:

$ yarn
yarn install v1.15.2
[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
[3/4] ๐Ÿ”—  Linking dependencies...
warning "workspace-aggregator-065e543a-ac3c-4ecc-82c3-2e315acde1cc > **redacted** > graphiql > [email protected]" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
warning "workspace-aggregator-065e543a-ac3c-4ecc-82c3-2e315acde1cc > **redacted** > graphiql > codemirror-graphql > [email protected]" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
warning "workspace-aggregator-065e543a-ac3c-4ecc-82c3-2e315acde1cc > **redacted** > graphiql > codemirror-graphql > [email protected]" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
warning "workspace-aggregator-065e543a-ac3c-4ecc-82c3-2e315acde1cc > **redacted** > graphiql > codemirror-graphql > graphql-language-service-interface > [email protected]" has incorrect peer dependency "graphql@^0.11.0 || ^0.12.0 || ^0.13.0".
warning "workspace-aggregator-065e543a-ac3c-4ecc-82c3-2e315acde1cc > **redacted** > graphiql > codemirror-graphql > graphql-language-service-interface > [email protected]" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
warning "workspace-aggregator-065e543a-ac3c-4ecc-82c3-2e315acde1cc > **redacted** > graphiql > codemirror-graphql > graphql-language-service-interface > [email protected]" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0".
warning "workspace-aggregator-065e543a-ac3c-4ecc-82c3-2e315acde1cc > **redacted** > graphiql > codemirror-graphql > graphql-language-service-interface > graphql-config > [email protected]" has incorrect peer dependency "graphql@^0.11.0 || ^0.12.0 || ^0.13.0".
[4/4] ๐Ÿ”จ  Building fresh packages...
success Saved lockfile.
โœจ  Done in 4.55s.

this PR will get us closer, so that travis builds for PRs that change package.json files aren't broken by greenkeeper-lockfile@1 at least. this was an issue for #251 that @AGS- created to upgrade graphql

also, from deep down in the weeds, it looks like prisma/graphql-config 2.2.1 depends on a version of prisma/graphql-import whose peer dependencies don't resolve 0.14, though the latest does.

your best bet to get around the package resolution issue until then is to use resolutions in package.json to override the peer dependency resolutions, i think?

Gonna run this PR on my own fork first so I can watch the travis builds
https://github.com/acao/graphql-language-service/pull/1

@achao Thanks for working on this ๐Ÿ‘ Yes, I know deep down there are more packages that don't have 14.0 as peer. I actually tried to do resolution for all packages but there were too many to make it work. With your changes it will get better and perhaps resolutions for the ones left will work!

FYI you don't have to specify paths in the resolutions; you can just do:

  "resolutions": {
    "graphql": "14.x"
  }

Make sure you're aware of the risks (i.e. incompatible packages), but I find this is typically a much safer approach for GraphQL.

Thanks @benjie, that's what I was thinkin!

Definately @jonaskello - I think our last step after merging the above PR (I merged it with #350 once I saw everything pass in Travis) is to eliminate the peer dependency mismatch once and for all, by releasing a 2.2.x version of graphql-config that bumps graphql-import and anything else it depends on that doesn't resolve graphql 14.x yet. I wonder if using the latest greenkeeper lockfile/monorepo support will start taking care of this anyways? Maybe we should close some of the failing greenkeeper PRs before this gets merged?

@benjie do we want to merge #350 and let greenkeeper 3 start doing its magic? everything should ideally start falling into place once that happens

@AGS- @lostplan are you the current active contributors with publishing rights?

@acao Sounds like a plan. I just reviewed it; I'm not sufficiently familiar with greenkeeper to comment on that part of the PR but the only issue I saw was a typo in the GraphQL version numbers. I'd rather have seen the integrity check changes in a separate no-op PR just to minimise the diff size; but that's not a big deal. I don't have merge access.

@benjie thanks! yeah they were separate originally but then I merged them for some reason that escapes me now

Beautiful indeed ๐Ÿ’ฏ

So, if anyone here is concerned about how this impacts codemirror-graphql or graphiql, we seem to have a situation where the latest graphql-language-service-interface (2.0) is not working with codemirror-graphql. Going to see if we can make another release of 1.x somehow to get around this?

hi, I can see that 2.0.1 with grapqhl 14 support is out on https://github.com/graphql/graphql-language-service/releases/tag/v2.0.1 but I can't seem to find it on npm

should be able to get this all released shortly! then we have some follow up work to deprecate support for

this should be resolved in the latest 2.1.0 releases! sorry it took so long.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

asiandrummer picture asiandrummer  ยท  12Comments

OlegIlyenko picture OlegIlyenko  ยท  17Comments

rherrmann picture rherrmann  ยท  19Comments

okorz001 picture okorz001  ยท  18Comments

intellix picture intellix  ยท  10Comments