Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 31 million developers.Sign up
#1335 Immutable Ast
This is a change we actually started a few months ago with making nearly all Nodes immutable.
This PR makes now all Nodes immutable and also provides a convenient way of changing Nodes in a Tree.
See #1335 (comment) for more details how to do that.
It contains also a change for the general tree
TraverserContext: the result per Context is gone in favour of a accumulate property which lets you implement a general tree
Special thanks to @felipe-gdr for this PR.
CodeRegistry was introduced which separates "code" (DataFetcher and TypeResolver) from the actual GraphQLSchema.
As a consequence you can't read the
TypeResolver anymore from a GraphQL object. (Adding a DataFetcher and TypeResolver when creating a GraphQLSchema is deprecated but still works as before. This was done for backwards compatibility but will be removed in a future version and hence the only way t associate data fetcher code with fields will be via the
#1313 Default Context object
GraphQL Java now offers a default context object if nothing was set.
The small breaking change is that the default context value is not null any more. We dont expect this to be a problem in practice.
#1387 removed ExecutionContext from DataFetcherEnvironment
ExecutionContext was removed from DataFetcherEnvironment in favour of adding more properties to the DataFetcherEnvironment directly.
#1415 General Purpose Error Builder
The breaking change is regarding mapping or errors returned from a
DataFetcherResult has a new property
isMapRelativeErrors which is
false by default. Previously it was like it was
true by default . When it is
true, the data fetching code will map this error as being a relative error from the existing field. If it is
false then any errors returned will be passed on unchanged.
All breaking changes PRs
#1416 SchemaDirectiveWiring is now done after the full set of graphql elements are built
This makes the schema directive wiring occur after the type has been built and hence the callback gets full access to the type hierarchy
#1376 Passing local context objects from data fetchers to child fields
This uses DataFetcherResult as the mechanism for a DataFetcher to pass local context objects down to child fetchers. This allows parent fields to pass down information to lower layers. If a field does not pass any local context down, then the local context from the previous parent is used.