-
Notifications
You must be signed in to change notification settings - Fork 470
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
Preparations for graphql@15.x. #1743
Conversation
…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
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
#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
I can confirm this fixes errors in graphql v15 (which is now released). any chance of getting this merged? |
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 CLI build Language server build 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 |
There was a problem hiding this 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!
The releases associated with this change can be found on the • |
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. |
This PR makes the minimal number of changes necessary for the
apollo-tooling
's repository's tests to pass for the plannedgraphql@15.x
release.Notable changes to implementations are as follows:
an adjustment to account for the new
onError
callback introduced by [validation] Add "onError" option to allow for custom error handling behavior when performing validation graphql/graphql-js#2074, which deprecated the previously usedValidationContext.prototype.getErrors
method.utilize the
GraphQLEnumValueConfig
type instead ofGraphQLEnumValue
(which lead to the removal of thename
field, which isn't actually needed when building thevalues
for theGraphQLEnumType
constructor.Ref: graphql/graphql-js#2303