MyGit

v11.0

graphql-java/graphql-java

版本发布时间: 2018-10-20 08:48:26

graphql-java/graphql-java最新发布版本:v22.3(2024-09-05 11:15:52)

Breaking changes

#1263 - DataLoader Scope changes

The dataloader support in graphql-java has been changed to encourage the right behavior. The DataLoaderRegistry and its contained DataLoaders need to be per execution instance based. However the previous setup made them tied to schema which is typically shared across executions.

Instead now the DataLoaderRegistry is specified as a property of the ExecutionInput and hence definitely per execution. This ensure thats the behaviour of data loader is scope to one execution and only one execution.

#1269 #1275 #1276 #1277 - ExecutionTypeInfo changed

These PRs are all somehow related. The main change is that we renamed ExecutionTypeInfo to a more semantically correct ExecutionStepInfo since it contains much more information than just type information and it is actually focused around the current step of the execution. We also changed the meaning of ExecutionStepInfo.type for non nullable types: previously it has been automatically unwrapped so that type was never NonNull. If you used .getType() please change it to .getUnwrappedNonNullType() to avoid any logic changes.

Also castType was removed (just do the cast yourself if needed) and treatAs was renamed to changeTypeWithPreservedNonNull.

Other changes

#1269 - data fetchers can get their parents arguments

Sometimes a child data fetcher wants to lookup upwards and know what arguments are passed to its parents. This is now supported via the ExecutionStepInfo class. You can get the parent ExecutionStepInfo from the current field ExecutionStepInfo and also gets its arguments.

#1213

Directives are now considered children of graphql types and will be visited like other children. This allows you to write Traversals that find directives on graphql type objects and apply certain behaviours.

#1264 default methods on interfaces can now supply values to the property data fetcher

#1255 a possible deadlock in the data loader instrumentation tracking was fixed when DataLoader is not per execution

#1243 all the older BatchedExecutionStrategy code is deprecated. Use the DataLoader pattern instead

#1222 The handling of __typename was fixed that caused problems in max query complexity

#1203 the field paths now using the field alias of defined as the path name. This is more correct and specific.

All PRs can be seen here : https://github.com/graphql-java/graphql-java/pulls?q=is%3Apr+milestone%3A11.0

相关地址:原始地址 下载(tar) 下载(zip)

查看:2018-10-20发行的版本