graphql-component
Advanced tools
Changelog
v2.2.0
makeExecutableSchema
functionChangelog
v2.1.7
__resolveReference()
resolver which was preventing __resolveReference()
from running when using graphql-component
to build federated schemas in seperate graphql services.Changelog
v2.1.6
graphql-component
being used in a federated schema was brought to our attention and was attributed to the non-root type field resolver wrapping performed to help prevent double execution of resolvers with local delegation. Effectively, the resolver wrapping functionality was causing a null value to be returned (by attempting to return a value from the root arg) when the wrapper should have been calling through to the actual resolver. To fix this, separate wrapper functions are used for fields that begin with __
(such as __resolveType()
) versus "normal" non-root type fields. These separated wrapper functions look for similar but slightly different conditions to determine whether to "short circuit" an already computed result which ensures that the wrapper functions are short circuiting or calling through to the actual resolver in the desired situations.Changelog
v2.1.5
args
key for passing arguments to the target GraphQL operation via JavaScript from the calling resolver. Previously, if you attempted to pass an array (wrapping any form of JavaScript scalar) a type coersion error would surface. delegateToComponent's options.args parameter now supports passing Array like arguments as expected.Changelog
v2.1.4
Changelog
v2.1.3
Changelog
v2.1.2
Query
, Mutation
, Subscription
) and/or fields on root types can be excluded, which was not the case for resolver functions prior to this fix.Changelog
v2.1.0
delegateToComponent()
- automatically prune fields from the delegated document selection set that are not defined in the schema (component) being delegated to. This will reduced potential down stream errors as well as ensures no unintended fields are forwarded and all fields forwarded can be resolved by the schema be delegated to. This feature addresses some edge cases around variable forwarding that were not addressed in prior patch releases 2.0.4
and 2.0.5
.Changelog
v2.0.5
delegateToComponent()
. All variable values will be forwarded to the delegated operation, but only the variable definitions for input types or types that are in the target schema will be forwarded. This prevents errors in certain delegate situations while also allowing valid resolution of args passed as variables.