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

Upgrade GraphQL to 16 #8997

Merged
merged 1 commit into from Nov 8, 2021
Merged

Upgrade GraphQL to 16 #8997

merged 1 commit into from Nov 8, 2021

Conversation

brainkim
Copy link
Contributor

@brainkim brainkim commented Nov 1, 2021

Allows for graphql@16 to be used with Apollo Client.

Fixes:

@brainkim brainkim changed the title Brian graphql16 upgrade Upgrade GraphQL to 16 Nov 1, 2021
@brainkim brainkim changed the base branch from main to release-3.5 November 1, 2021 19:27
@brainkim brainkim requested a review from benjamn November 1, 2021 20:31
@brainkim
Copy link
Contributor Author

brainkim commented Nov 1, 2021

Maybe we can use a type assertion, and see if that lets us not bump the filesize of the client.

@brainkim brainkim marked this pull request as draft November 1, 2021 20:33
@brainkim brainkim marked this pull request as ready for review November 2, 2021 14:53
src/core/QueryManager.ts Show resolved Hide resolved
src/link/core/types.ts Show resolved Hide resolved
src/link/core/types.ts Show resolved Hide resolved
src/utilities/common/errorHandling.ts Outdated Show resolved Hide resolved
src/utilities/graphql/transform.ts Outdated Show resolved Hide resolved
src/utilities/graphql/fragments.ts Outdated Show resolved Hide resolved
src/utilities/graphql/fragments.ts Show resolved Hide resolved
@brainkim
Copy link
Contributor Author

brainkim commented Nov 3, 2021

@CruseCtrl The tricky thing is trying to support multiple GraphQL versions. The types as enums don’t exist in GraphQL 15, so I’m trying to figure out a way to continue to support multiple version. I also created this issue on the GraphQL.js repository (graphql/graphql-js#3356)

@CruseCtrl
Copy link

Ah, I see. In that case I can't think of a better way to solve this than what you've already done

@benjamn
Copy link
Member

benjamn commented Nov 4, 2021

@brainkim You are probably already aware of this, but I tried checking out this PR, running npm i && npm test (all pass), then npm i graphql@15.x && npm test. When I do that, I get many Kind-related errors trying to run the tests. Unless I'm missing something, this means we don't have a strategy (yet) for supporting graphql@15 and graphql@16 simultaneously (never mind graphql@14). Hoping you have some more ideas here!

Aside: mind rebasing after #9004 (just package.json conflicts)?

@brainkim
Copy link
Contributor Author

brainkim commented Nov 4, 2021

@benjamn I’m trying to see if we can get this merged and not have to make as many changes:

graphql/graphql-js#3360

@brainkim brainkim marked this pull request as ready for review November 8, 2021 20:15
Copy link
Member

@hwillson hwillson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome - thanks @brainkim!

@brainkim brainkim merged commit 24799a9 into release-3.5 Nov 8, 2021
@brainkim brainkim deleted the brian-graphql16-upgrade branch November 8, 2021 21:30
benjamn added a commit to apollographql/react-apollo-error-template that referenced this pull request Nov 22, 2021
Similar to changes made by @brainkim in
apollographql/apollo-client#8997, this commit
fixes the React Apollo template application when built with graphql@16,
since support for passing positional arguments was removed in
graphql/graphql-js#2904.
benjamn added a commit to apollographql/react-apollo-error-template that referenced this pull request Nov 22, 2021
Similar to changes made by @brainkim in
apollographql/apollo-client#8997, this commit
fixes the React Apollo template application when built with graphql@16,
since support for passing positional arguments was removed in
graphql/graphql-js#2904.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants