@@ -349,6 +349,7 @@ protected CompletableFuture<ExecutionResult> completeValue(ExecutionContext exec
349349 .field (parameters .field ().get (0 ))
350350 .value (parameters .source ())
351351 .argumentValues (parameters .arguments ())
352+ .context (executionContext .getContext ())
352353 .schema (executionContext .getGraphQLSchema ()).build ();
353354 resolvedType = resolveTypeForInterface (resolutionParams );
354355
@@ -358,6 +359,7 @@ protected CompletableFuture<ExecutionResult> completeValue(ExecutionContext exec
358359 .field (parameters .field ().get (0 ))
359360 .value (parameters .source ())
360361 .argumentValues (parameters .arguments ())
362+ .context (executionContext .getContext ())
361363 .schema (executionContext .getGraphQLSchema ()).build ();
362364 resolvedType = resolveTypeForUnion (resolutionParams );
363365 } else {
@@ -435,7 +437,7 @@ protected Iterable<Object> toIterable(Object result) {
435437 * @return a {@link GraphQLObjectType}
436438 */
437439 protected GraphQLObjectType resolveTypeForInterface (TypeResolutionParameters params ) {
438- TypeResolutionEnvironment env = new TypeResolutionEnvironment (params .getValue (), params .getArgumentValues (), params .getField (), params .getGraphQLInterfaceType (), params .getSchema ());
440+ TypeResolutionEnvironment env = new TypeResolutionEnvironment (params .getValue (), params .getArgumentValues (), params .getField (), params .getGraphQLInterfaceType (), params .getSchema (), params . getContext () );
439441 GraphQLObjectType result = params .getGraphQLInterfaceType ().getTypeResolver ().getType (env );
440442 if (result == null ) {
441443 throw new UnresolvedTypeException (params .getGraphQLInterfaceType ());
@@ -451,7 +453,7 @@ protected GraphQLObjectType resolveTypeForInterface(TypeResolutionParameters par
451453 * @return a {@link GraphQLObjectType}
452454 */
453455 protected GraphQLObjectType resolveTypeForUnion (TypeResolutionParameters params ) {
454- TypeResolutionEnvironment env = new TypeResolutionEnvironment (params .getValue (), params .getArgumentValues (), params .getField (), params .getGraphQLUnionType (), params .getSchema ());
456+ TypeResolutionEnvironment env = new TypeResolutionEnvironment (params .getValue (), params .getArgumentValues (), params .getField (), params .getGraphQLUnionType (), params .getSchema (), params . getContext () );
455457 GraphQLObjectType result = params .getGraphQLUnionType ().getTypeResolver ().getType (env );
456458 if (result == null ) {
457459 throw new UnresolvedTypeException (params .getGraphQLUnionType ());
0 commit comments