chore(deps): update dependency com.graphql-java:graphql-java to v18 #427
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
17.3
->18.0
Release Notes
graphql-java/graphql-java
v18.0
We are happy to announce v18.0 of graphql-java
https://github.com/graphql-java/graphql-java/pulls?q=is%3Apr+milestone%3A18.0+is%3Aclosed
Applied Directives
Graphql directives have two modes. They can be defined in a schema
and they can be applied to schema elements and query elements
So we have a directive definition and cases where that directive is applied to an element.
However when the
graphql.schema.GraphQLDirective
andgraphql.schema.GraphQLArgument
classes was created, we modelled this badly. These classes should really represent a directive definition in schema only but we reused them to also be the representation of a directive and value arguments applied to another schema or query element.This modelling is wrong. You can tell because we have javadoc comments like this in
graphql.schema.GraphQLArgument
saying a certain property is only applicable in certain call contexts.So we have decided to fix this bad class modelling in version 18. We have introduced new classes
graphql.schema.GraphQLAppliedDirective
graphql.schema.GraphQLAppliedDirectiveArgument
which represent an applied directive on a schema element and
graphql.execution.directives.QueryAppliedDirective
graphql.execution.directives.QueryAppliedDirectiveArgument
which represent an applied directive on a query element
For backwards compatibility reasons, the old
graphql.schema.GraphQLDirective
objects are still created forapplied
elements however the methods have all been deprecated and like for likegetAppliedXXX
methods have been introduced.You should migrate your code way from getting applied directives from the old methods and use the new more correctly modelled classes. This backwards compatibility will be removed in a future version.
Because of this backwards compatibility, there are a few gotchas to look out for. For example visitors will be called twice for the same applied element, eg one for the old style
GraphQLDirective
object and one for the newGraphQLAppliedDirective
object. You should choose the new classes only as part of code migration. This should only affect code that does schema and query traversal (which is an advanced use case) and hence most consumers of graphql-java will not be affected.There is one breaking change here.
graphql.introspection.IntrospectionWithDirectivesSupport
and its predicate argumentgraphql.introspection.IntrospectionWithDirectivesSupport.DirectivePredicateEnvironment
have been changed to provide a directive name and not the appliedGraphQLDirective
directly. Again we think very few people will be affected by this breaking change.https://github.com/graphql-java/graphql-java/pull/2186
Dramatic performance improvement on Validation rules
The team at Twitter contributed a changed to the
RulesVisitor
that is used to validate a query against the set of validation rules. For large queries this could be a performance drag.https://github.com/graphql-java/graphql-java/pull/2563
Skipping validation rules
In extreme cases, a server may choose to skip certain validation rules. We don't recommend it, because results may become unpredictable and we won't support fixing issues caused by deactivated rules.
However it is now possible and may help trade validation for performance.
https://github.com/graphql-java/graphql-java/pull/2598
DataLoader has been upgrade
The java data loader version has been upgrade to
3.1.2
which as some bug fixes and small improvements.https://github.com/graphql-java/graphql-java/pull/2724
PreparsedDocumentProvider
changesThe
graphql.execution.preparsed.PreparsedDocumentProvider
has been updated to use aCompletableFuture<PreparsedDocumentEntry> getDocumentAsync
method. This allows you to go to a remote cache in an asynchronous non blocking manner to get cached documents. This should have always been modelled in this manner.However its an optional default interface method thats called the old deprecated synchronous method direct.
https://github.com/graphql-java/graphql-java/pull/2612/files
AstPrinter
performanceThe AST printer has been improved to stop unnecessary string allocation. For very large queries this slowed printing down dramatically.
https://github.com/graphql-java/graphql-java/pull/2729
Local context and field selection in TypeResolutionEnvironment
The type resolvers now can get access to the local context object via the passed in
graphql.TypeResolutionEnvironment
interface.Similarly, the field sub selection
graphql.schema.DataFetchingFieldSelectionSet
is also now available.https://github.com/graphql-java/graphql-java/pull/2699
https://github.com/graphql-java/graphql-java/pull/2597
Auto generated list of What's Changed
SchemaPrinter
. by @folone in https://github.com/graphql-java/graphql-java/pull/2575Introspection.__DirectiveLocation
regression tests by @jord1e in https://github.com/graphql-java/graphql-java/pull/2703SchemaPrinter
(\r\n -> \n
) by @jord1e in https://github.com/graphql-java/graphql-java/pull/2705@Deprecated
toExecutionStepInfo#getFieldContainer()
by @jord1e in https://github.com/graphql-java/graphql-java/pull/2712New Contributors
Full Changelog: graphql-java/graphql-java@v17.3...v18.0
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.