Added support for Flow publishers coming back from the subscription field data fetcher by bbakerman · Pull Request #3910 · graphql-java/graphql-java · GitHub
Skip to content

Added support for Flow publishers coming back from the subscription field data fetcher#3910

Merged
bbakerman merged 1 commit into
masterfrom
support-flow-in-subscriptions
Jul 1, 2025
Merged

Added support for Flow publishers coming back from the subscription field data fetcher#3910
bbakerman merged 1 commit into
masterfrom
support-flow-in-subscriptions

Conversation

@bbakerman

Copy link
Copy Markdown
Member

This allows an implementation to return a Flow.Publisher in their data fetcher

It will be converted to a reactive streams publisher when it comes back out of the ExecutionResult.

@github-actions

Copy link
Copy Markdown
Contributor

SubscriptionPublisher mapSourceToResponse = new SubscriptionPublisher(publisher, mapperFunction, keepOrdered);
ExecutionResultImpl executionResult = new ExecutionResultImpl(mapSourceToResponse, executionContext.getErrors());
return executionResult;
return new ExecutionResultImpl(mapSourceToResponse, executionContext.getErrors());

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just redundant variables cleanup

Copy link
Copy Markdown
Member Author

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

@bbakerman bbakerman merged commit 338ffdd into master Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants