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

Preparations for graphql@15.x. #3712

Merged
merged 7 commits into from
Jan 29, 2020
Merged

Preparations for graphql@15.x. #3712

merged 7 commits into from
Jan 29, 2020

Conversation

abernix
Copy link
Member

@abernix abernix commented Jan 24, 2020

Supersedes #3649.

This PR makes the changes necessary to accommodate deprecations in graphql@15.x, but does not go so far as to update this repository's devDependencies to use the 15.x version. (This will occur in a follow-up PR and will include the commits seen in abernix/graphql-js-v15...abernix/graphql-js-v15-after-devDependency-gets-updated).

To reiterate, all of the changes included in this change-set are to address deprecations in graphql@15. Despite their deprecations in versions pre-graphql@0.13 (the earliest peer dependency range that Apollo Server 2.x technically supports), we have continued to rely on these methods despite them having newer APIs available. That's just an artifact of us having leveraged graphql-js for so many years.

In another follow-up PR, I intend to expand the peerDependencies range of Apollo Server to include graphql-js@15.x pre-release versions, in order to allow the community to try it out in their own projects without peer dependency warnings. (Though it's worth noting that after this PR lands and is released, there's nothing stopping anyone from trying that on their own since peer dependency warnings are simply warnings.)

Instead, use `getIntrospectionQuery` instead, which has been around since
before graphql@0.13.x, thus within our supported version ranges.
This file now lives at `getIntrospectionQuery`.
I'm assuming we'll want to keep this change which was also applied upstream,
though I'm not sure what our longer term plans are for keeping up with these
changes.

Ref: https://github.com/graphql/graphql-js/pull/2177/files#diff-71ba52e9c625f826d2b0df2963c8633aR320
In `graphql@15`, empty descriptions are intentionally included in the SDL
output.  In order to be excluded entirely, they must be absent (or `null`).

Ref: graphql/graphql-js#2177
@IvanGoncharov
Copy link
Member

@abernix Thanks for working on this 👍
I created a couple of PR's to assist with migration: #3727 #3724
Also, I plan to publish 15.0.0-rc2 in the next few days if nothing will be discovered it will be the last RC before 15.0.0 release.

@abernix abernix added this to the 2.10.0 milestone Jan 27, 2020
@abernix abernix merged commit 131c9b8 into master Jan 29, 2020
@abernix abernix deleted the abernix/graphql-js-v15 branch January 29, 2020 17:58
abernix added a commit that referenced this pull request Jun 8, 2020
In a general sense this just updates tests to accommodate the new error
conditions and schema hashes since a lot of the work has already been done
in #3712 / 131c9b8.

A larger note is due to explain the updating the snapshots.  Those changes
are due the fact that types returned by, e.g.  `getImplementation`, will now
be dependent on the order that those types first appear in the schema.

See the referenced issues, the first of which implemented the change and the
second which indicates the motivation.

Ref: graphql/graphql-js#2410
Ref: graphql/graphql-js#2362
Ref: #3712 (131c9b8)
abernix added a commit to apollographql/federation that referenced this pull request Sep 4, 2020
* Adjust test to not use deprecated `introspectionQuery` constant.

Instead, use `getIntrospectionQuery` instead, which has been around since
before graphql@0.13.x, thus within our supported version ranges.

* Adjust documentation links for moved `introspectionQuery` page.

This file now lives at `getIntrospectionQuery`.

* Applying upstream modification to `printDescription`.

I'm assuming we'll want to keep this change which was also applied upstream,
though I'm not sure what our longer term plans are for keeping up with these
changes.

Ref: https://github.com/graphql/graphql-js/pull/2177/files#diff-71ba52e9c625f826d2b0df2963c8633aR320

* Remove empty descriptions which will be included in SDL w/graphql@15.

In `graphql@15`, empty descriptions are intentionally included in the SDL
output.  In order to be excluded entirely, they must be absent (or `null`).

Ref: graphql/graphql-js#2177

Apollo-Orig-Commit-AS: apollographql/apollo-server@131c9b8
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 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.

3 participants