@@ -541,7 +541,7 @@ class ExecutionStrategyTest extends Specification {
541541 DataFetchingEnvironment environment
542542
543543 when :
544- executionStrategy. resolveField (executionContext, parameters)
544+ executionStrategy. resolveFieldWithInfo (executionContext, parameters)
545545
546546 then :
547547 1 * dataFetcher. get(_,_,_) >> { environment = (it[2 ] as Supplier<DataFetchingEnvironment > ). get() }
@@ -636,7 +636,7 @@ class ExecutionStrategyTest extends Specification {
636636 }
637637
638638 when :
639- overridingStrategy. resolveField (executionContext, parameters)
639+ overridingStrategy. resolveFieldWithInfo (executionContext, parameters)
640640
641641 then :
642642 handlerCalled == true
@@ -646,29 +646,6 @@ class ExecutionStrategyTest extends Specification {
646646 exceptionWhileDataFetching. getMessage(). contains(' This is the exception you are looking for' )
647647 }
648648
649- def " test that the old legacy method is still useful for those who derive new execution strategies" () {
650-
651- def expectedException = new UnsupportedOperationException (" This is the exception you are looking for" )
652-
653- // noinspection GroovyAssignabilityCheck,GroovyUnusedAssignment
654- def (ExecutionContext executionContext, GraphQLFieldDefinition fieldDefinition, ResultPath expectedPath, ExecutionStrategyParameters parameters, Field field, SourceLocation sourceLocation) = exceptionSetupFixture(expectedException)
655-
656-
657- ExecutionStrategy overridingStrategy = new ExecutionStrategy () {
658- @Override
659- CompletableFuture<ExecutionResult > execute (ExecutionContext ec , ExecutionStrategyParameters p ) throws NonNullableFieldWasNullException {
660- null
661- }
662- }
663-
664- when :
665- overridingStrategy. resolveField(executionContext, parameters)
666-
667- then :
668- executionContext. errors. size() == 1
669- def exceptionWhileDataFetching = executionContext. errors[0 ] as ExceptionWhileDataFetching
670- exceptionWhileDataFetching. getMessage(). contains(' This is the exception you are looking for' )
671- }
672649
673650 def " #2519 data fetcher errors for a given field appear in FetchedResult within instrumentation" () {
674651 def expectedException = new UnsupportedOperationException (" This is the exception you are looking for" )
@@ -700,7 +677,7 @@ class ExecutionStrategyTest extends Specification {
700677 }
701678
702679 when :
703- overridingStrategy. resolveField (instrumentedExecutionContext, params)
680+ overridingStrategy. resolveFieldWithInfo (instrumentedExecutionContext, params)
704681
705682 then :
706683 FetchedValue fetchedValue = instrumentation. fetchedValues. get(" someField" )
@@ -761,7 +738,8 @@ class ExecutionStrategyTest extends Specification {
761738 .build()
762739
763740 when :
764- executionStrategy. resolveField(executionContext, parameters). join()
741+ FieldValueInfo fieldValueInfo = (executionStrategy. resolveFieldWithInfo(executionContext, parameters) as CompletableFuture ). join()
742+ (fieldValueInfo. fieldValueObject as CompletableFuture ). join()
765743
766744 then :
767745 thrown(CompletionException )
0 commit comments