-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Added support for Flow publishers coming back from the subscription field data fetcher #3910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…ield data fetcher
Test Results 313 files ±0 313 suites ±0 55s ⏱️ -1s Results for commit 93a66bb. ± Comparison against base commit 1318a24. This pull request removes 192 and adds 174 tests. Note that renamed tests count towards both.
|
} | ||
Function<Object, CompletionStage<ExecutionResult>> mapperFunction = eventPayload -> executeSubscriptionEvent(executionContext, parameters, eventPayload); | ||
boolean keepOrdered = keepOrdered(executionContext.getGraphQLContext()); | ||
SubscriptionPublisher mapSourceToResponse = new SubscriptionPublisher(publisher, mapperFunction, keepOrdered); | ||
ExecutionResultImpl executionResult = new ExecutionResultImpl(mapSourceToResponse, executionContext.getErrors()); | ||
return executionResult; | ||
return new ExecutionResultImpl(mapSourceToResponse, executionContext.getErrors()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just redundant variables cleanup
} | ||
}; | ||
} | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this code into CommonMessagePublisher for re-use reasons
This allows an implementation to return a
Flow.Publisher
in their data fetcherIt will be converted to a reactive streams publisher when it comes back out of the ExecutionResult.