Skip to content

Update GraphQL to 14 #3190

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

Closed
felixakiragreen opened this issue Apr 29, 2019 · 8 comments
Closed

Update GraphQL to 14 #3190

felixakiragreen opened this issue Apr 29, 2019 · 8 comments
Labels
feature-request Request a new feature GraphQL Related to GraphQL API issues

Comments

@felixakiragreen
Copy link

felixakiragreen commented Apr 29, 2019

Is your feature request related to a problem? Please describe.
I have conflicting GraphQL versions which results in this error in production (not local dev):

Uncaught Error: Cannot use e "__Schema" from another module or realm.

Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.

https://yarnpkg.com/en/docs/selective-version-resolutions

Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.

This is because I am using aws-amplify-react which has aws-amplify as a peer-dependency. aws-amplify pulls in @aws-amplify/api which has a graphql dependency locked in to 0.13.0. This release is over a year old, and 14.0 was in Aug '18, over 6 months ago.
I'm also using Apollo which requires 14.

Describe the solution you'd like
I would like for @aws-amplify/api to update its graphQL dependency version.

Describe alternatives you've considered

  • I've tried using yarn's resolutions: 14.0.0 - this appears to work locally but not when it's deployed.
  • Not using aws-amplify and instead pulling in the module we need: @aws-amplify/core, @aws-amplify/auth & @aws-amplify/ui (https://github.com/aws-amplify/amplify-js/wiki/Amplify-modularization) but this doesn't work because aws-amplify-react has a peer dependency with aws-amplify and even if I get around that, it uses @aws-amplify/api which is the part that includes graphql.
  • I can't revert to using graphQL 0.13 because we already have a system in place built on Apollo and reverting that would be far too much work.

Additional context
The only thing I can think of doing now is removing our dependency on aws-amplify-react, and then using our own UI for the sign in. That then I can go the modular AWS approach and avoid @aws-amplify/api.

@manueliglesias manueliglesias added feature-request Request a new feature GraphQL Related to GraphQL API issues labels Apr 30, 2019
@manueliglesias
Copy link
Contributor

Hi @xenophilicibex

I am labeling this as a feature request, thanks!

@d2kx
Copy link

d2kx commented May 2, 2019

While I agree that I would like to see it updated, I don't see why this would be a problem when using Apollo. aws-mobile-appsync-sdk-js which is the package used for using AppSync with the Apollo client is also locked to GraphQL 0.13.0 (and Apollo client 2.4.x, which allows GraphQL 0.13.0).

@stale
Copy link

stale bot commented Jun 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@wjramos
Copy link

wjramos commented Sep 5, 2019

I'm also encountering issues with this and would like to see this change

@stanislav-sidorov
Copy link

same problem
[email protected] requires a peer of [email protected]
@apollo/[email protected] requires a peer of graphql@^14.3.1
@apollo/[email protected] requires a peer of graphql@^14.3.1

@ErickMwazonga
Copy link

++
same problem
@apollo/[email protected] requires a peer of graphql@^14.3.1
@apollo/[email protected] requires a peer of graphql@^14.3.1

@sammartinez
Copy link
Contributor

@xenophilicibex GraphQL version is upgraded to version 14.0.0. Resolving this request as complete.

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request a new feature GraphQL Related to GraphQL API issues
Projects
None yet
Development

No branches or pull requests

7 participants