| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| initialResult.incrementalItemPublisher.subscribe(sub) | ||
|
|
||
| then: | ||
| Awaitility.await().untilTrue(sub.isDone()) |
There was a problem hiding this comment.
Needs an assert on the contents of the Publisher
Sorry, something went wrong.
| && deferredExecutionSupport.deferredFieldsCount() > 0 | ||
| && executionContext.getGraphQLContext().getBoolean(IncrementalExecutionContextKeys.ENABLE_EAGER_DEFER_START, false)) { | ||
|
|
||
| executionContext.getIncrementalCallState().startDeferredCalls(); |
There was a problem hiding this comment.
This call here is only need as a side effect to create the memoizing supplier (of the Publisher)
I think we should invent a new method that does that and hides the side effect
executionContext.getIncrementalCallState().startEarlyDraining();
Sorry, something went wrong.
There was a problem hiding this comment.
Hang on you have that - startDrainingNow() and it calls publisher.get()
I dont think executionContext.getIncrementalCallState().startDeferredCalls(); is needed
Sorry, something went wrong.
|
|
||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
We need to create a new entry in the unusual config - lets put it in
graphql.GraphQLUnusualConfiguration.IncrementalSupportConfig
/**
* This controls whether @defer field execution starts as early as possible.
*/
@ExperimentalApi
public IncrementalSupportConfig enableEarlyFieldExecution(boolean enable) {
contextConfig.put(YOUR_KEY_HERE, enable);
return this;
}
Sorry, something went wrong.
| } | ||
|
|
||
| public void startDrainingNow() { | ||
| startDeferredCalls(); |
There was a problem hiding this comment.
no need to call start Deferred calls as it just creates the publisher
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is to optimise defer execution for incremental results to begin processing as soon as the first incremental call is detected rather than on completion of the initial result.