🌐 AI搜索 & 代理 主页
Skip to content

Commit 50169f0

Browse files
committed
GQLGW-5297-assert-on-result-and-remove-redundant-call
1 parent a5c458e commit 50169f0

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

src/main/java/graphql/execution/ExecutionStrategy.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,6 @@ DeferredExecutionSupport createDeferredExecutionSupport(ExecutionContext executi
333333
&& deferredExecutionSupport.deferredFieldsCount() > 0
334334
&& executionContext.getGraphQLContext().getBoolean(IncrementalExecutionContextKeys.ENABLE_EAGER_DEFER_START, false)) {
335335

336-
executionContext.getIncrementalCallState().startDeferredCalls();
337336
executionContext.getIncrementalCallState().startDrainingNow();
338337
}
339338

src/main/java/graphql/execution/incremental/IncrementalCallState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public Publisher<DelayedIncrementalPartialResult> startDeferredCalls() {
105105
}
106106

107107
public void startDrainingNow() {
108-
publisher.get();
108+
startDeferredCalls();
109109
drainIncrementalCalls();
110110
}
111111

src/test/groovy/graphql/execution/incremental/DeferExecutionSupportIntegrationTest.groovy

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,11 +1787,20 @@ class DeferExecutionSupportIntegrationTest extends Specification {
17871787
]
17881788

17891789
when:
1790-
def sub = new CapturingSubscriber<DelayedIncrementalPartialResult>()
1791-
initialResult.incrementalItemPublisher.subscribe(sub)
1790+
def incrementalResults = getIncrementalResults(initialResult)
17921791

17931792
then:
1794-
Awaitility.await().untilTrue(sub.isDone())
1793+
incrementalResults == [
1794+
[
1795+
hasNext : false,
1796+
incremental: [
1797+
[
1798+
path: [],
1799+
data: [post: [summary: "A summary"]]
1800+
]
1801+
]
1802+
]
1803+
]
17951804
}
17961805

17971806

0 commit comments

Comments
 (0)