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. #1743

Merged
merged 17 commits into from Jul 7, 2020

Conversation

abernix
Copy link
Member

@abernix abernix commented Jan 3, 2020

This PR makes the minimal number of changes necessary for the apollo-tooling's repository's tests to pass for the planned graphql@15.x release.

Notable changes to implementations are as follows:

Ref: graphql/graphql-js#2303

…uery()`.

`introspectionQuery` is deprecated in `graphql@15`.  The
`getIntrospectionQuery` utility has been around since before `0.13`, which
is still within our supported peer dependency ranges.

Ref: graphql/graphql-js#2125
We'll use the new `onError` callback which was introduced in
`graphql@14.5.0` by graphql/graphql-js#2074 only if
the `getErrors` method that existed prior to that addition no longer exists.
Even though we were importing it, we don't actually invoke it, however
that's more relevant now that it's officially deprecated in `graphql@15`.

Ref: graphql/graphql-js#2210
abernix added a commit to apollographql/apollo-client that referenced this pull request Jan 3, 2020
The next major version of `graphql-js` deprecates the `introspectionQuery`
constant (thanks to graphql/graphql-js#2124) that
was previously leveraged in Apollo Client tests for obtaining the
introspection query (to be clear, this is the query used to introspect a
server, not the result of the introspection itself) in one particular test.

This deprecation isn't entirely surprising since the `getIntrospectionQuery`
utility method has existed since `graphql@0.12` and is the recommended way
to obtain this query in more recent versions of `graphql`, so this changes
that test to use that new method.

I discovered this while investigating our compatibility with the most
recently published `graphql@15.0.0-alpha.2` on `apollo-server`,
`apollo-tooling` and `apollo-client`.  Other than this, I didn't encounter
any test failures when updating the root `graphql` dev-dependency to
`graphql@15.0.0-alpha.2`!

Deprecated by: graphql/graphql-js#2124
In Response to: graphql/graphql-js#2303
Relates to: apollographql/apollo-server#3649
Relates to: apollographql/apollo-tooling#1743
benjamn pushed a commit to apollographql/apollo-client that referenced this pull request Jan 3, 2020
#5748)

The next major version of `graphql-js` deprecates the `introspectionQuery`
constant (thanks to graphql/graphql-js#2124) that
was previously leveraged in Apollo Client tests for obtaining the
introspection query (to be clear, this is the query used to introspect a
server, not the result of the introspection itself) in one particular test.

This deprecation isn't entirely surprising since the `getIntrospectionQuery`
utility method has existed since `graphql@0.12` and is the recommended way
to obtain this query in more recent versions of `graphql`, so this changes
that test to use that new method.

I discovered this while investigating our compatibility with the most
recently published `graphql@15.0.0-alpha.2` on `apollo-server`,
`apollo-tooling` and `apollo-client`.  Other than this, I didn't encounter
any test failures when updating the root `graphql` dev-dependency to
`graphql@15.0.0-alpha.2`!

Deprecated by: graphql/graphql-js#2124
In Response to: graphql/graphql-js#2303
Relates to: apollographql/apollo-server#3649
Relates to: apollographql/apollo-tooling#1743
@chaffeqa
Copy link

I can confirm this fixes errors in graphql v15 (which is now released).

any chance of getting this merged?

@trevor-scheer trevor-scheer marked this pull request as ready for review July 2, 2020 22:37
@trevor-scheer
Copy link
Member

This PR is ready for review. For anyone following along, this is going to sit for the long weekend. However, if you'd like to try it out yourself you're welcome to install the builds from this PR directly into your project. I'll paste the links below to the builds, you can add them to your project via a typical npm install <link to build>

CLI build
https://105044-65563448-gh.circle-artifacts.com/0/storage/apollo/apollo-2.28.3.tgz

Language server build
https://105044-65563448-gh.circle-artifacts.com/0/storage/apollo-language-server/apollo-language-server-1.22.3.tgz

I'd love for people to try these out and let me know how they work over the next few days! Regardless, I think the next step for this PR will be to release it under the next tag so we can validate these changes more broadly.

Copy link
Member Author

@abernix abernix left a comment

Choose a reason for hiding this comment

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

✅ I approve this PR.

(But I can't actually approve it since I opened it originally.)

Thank you for taking this over the line!

@trevor-scheer trevor-scheer changed the base branch from master to release-2.29.0 July 7, 2020 21:18
@trevor-scheer trevor-scheer merged commit 56c37d8 into release-2.29.0 Jul 7, 2020
@trevor-scheer trevor-scheer deleted the abernix/graphql-js-v15.0.0-alpha.2 branch July 7, 2020 21:29
@trevor-scheer trevor-scheer added this to the Release 2.29.0 milestone Jul 7, 2020
@trevor-scheer
Copy link
Member

trevor-scheer commented Jul 7, 2020

The releases associated with this change can be found on the next dist-tag for the following packages. Please try them out and provide feedback on the release PR here: #2032

apollo-graphql@0.5.0-alpha.0
apollo-language-server@1.23.0-alpha.0
apollo@2.29.0-alpha.0

@WIStudent
Copy link

I just want to quickly point to issue #2232 hoping that it increases the chances that the right people see it. The short version is that there are issues with the graphql peer dependency defined in @apollographql/graphql-language-service-interface and how npm@7 resolves peer dependencies.

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

Successfully merging this pull request may close these issues.

None yet

4 participants