Skip to content

Commit

Permalink
Merge pull request #3484 from graphql-java/deffered-callcontext-bette…
Browse files Browse the repository at this point in the history
…r-allocation

Does not allocate a default deferred context that is thrown away on transform
  • Loading branch information
bbakerman committed Mar 4, 2024
2 parents 09738ea + bf75d08 commit 2362ffd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static class Builder {
ResultPath path = ResultPath.rootPath();
MergedField currentField;
ExecutionStrategyParameters parent;
DeferredCallContext deferredCallContext = new DeferredCallContext();
DeferredCallContext deferredCallContext;

/**
* @see ExecutionStrategyParameters#newParameters()
Expand Down Expand Up @@ -188,6 +188,9 @@ public Builder deferredCallContext(DeferredCallContext deferredCallContext) {
}

public ExecutionStrategyParameters build() {
if (deferredCallContext == null) {
deferredCallContext = new DeferredCallContext();
}
return new ExecutionStrategyParameters(executionStepInfo, source, localContext, fields, nonNullableFieldValidator, path, currentField, parent, deferredCallContext);
}
}
Expand Down

0 comments on commit 2362ffd

Please sign in to comment.