Skip to content

Commit

Permalink
ok not removing them - changing them
Browse files Browse the repository at this point in the history
  • Loading branch information
bbakerman committed Feb 28, 2024
1 parent 7728315 commit 31bf7ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ default void executeObjectOnFieldValuesException(Throwable t, ExecutionStrategyP
}

default void fieldFetched(ExecutionContext executionContext,
ExecutionStrategyParameters executionStrategyParameters
) {
ExecutionStrategyParameters executionStrategyParameters,
DataFetcher<?> dataFetcher,
Object fetchedValue) {

}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/graphql/execution/ExecutionStrategy.java
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ protected CompletableFuture<FetchedValue> fetchField(ExecutionContext executionC
dataFetcher = instrumentation.instrumentDataFetcher(dataFetcher, instrumentationFieldFetchParams, executionContext.getInstrumentationState());
dataFetcher = executionContext.getDataLoaderDispatcherStrategy().modifyDataFetcher(dataFetcher);
CompletableFuture<Object> fetchedValue = invokeDataFetcher(executionContext, parameters, fieldDef, dataFetchingEnvironment, dataFetcher);
executionContext.getDataLoaderDispatcherStrategy().fieldFetched(executionContext, parameters);
executionContext.getDataLoaderDispatcherStrategy().fieldFetched(executionContext, parameters, dataFetcher, fetchedValue);
fetchCtx.onDispatched(fetchedValue);
return fetchedValue
.handle((result, exception) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CompletableFuture;

@Internal
public class PerLevelDataLoaderDispatchStrategy implements DataLoaderDispatchStrategy {
Expand Down Expand Up @@ -186,7 +185,10 @@ private int getCountForList(List<FieldValueInfo> fieldValueInfos) {


@Override
public void fieldFetched(ExecutionContext executionContext, ExecutionStrategyParameters executionStrategyParameters) {
public void fieldFetched(ExecutionContext executionContext,
ExecutionStrategyParameters executionStrategyParameters,
DataFetcher<?> dataFetcher,
Object fetchedValue) {
int level = executionStrategyParameters.getPath().getLevel();
boolean dispatchNeeded = callStack.lock.callLocked(() -> {
callStack.increaseFetchCount(level);
Expand Down

0 comments on commit 31bf7ab

Please sign in to comment.