Skip to content

update FlowSubscriptionExecutionStrategy to support flow natively #1120

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

Merged
merged 1 commit into from
Apr 19, 2021

Conversation

dariuszkuc
Copy link
Collaborator

📝 Description

Update FlowSubscriptionExecutionStrategy to support Kotlin Flow natively (i.e. convert publishers to flows vs old logic of converting flows to publishers). While the Reactor Flux has a concept of subscriber context (and has full interop with Kotlin Flow), generic Publisher does not. This means that whenever we convert to a publisher we loose any contextual data that was available. This PR makes minimal changes to get our Spring server working with the updated subscription execution strategy.

TLDR Reverts the changes from #972 and updates the server to use the original flow subscription handler.

🔗 Related Issues

#1116
#972

Update `FlowSubscriptionExecutionStrategy` to support Kotlin `Flow` natively (i.e. convert publishers to flows vs old logic of converting flows to publishers). While the Reactor `Flux` has a concept of subscriber context (and has full interop with Kotlin `Flow`), generic `Publisher` does not. This means that whenever we convert to a publisher we loose any contextual data that was available. This PR makes minimal changes to get our Spring server working with the updated subscription execution strategy.

related: ExpediaGroup#1116
@dariuszkuc dariuszkuc added changes: major Changes require a major version module: generator Issue affects the schema generator and federation code module: server Issue affects the server code labels Apr 19, 2021
@smyrick smyrick merged commit 9709b1d into ExpediaGroup:master Apr 19, 2021
@dariuszkuc dariuszkuc deleted the subscription_flow branch April 19, 2021 21:16
huehnerlady pushed a commit to huehnerlady/graphql-kotlin that referenced this pull request Apr 27, 2021
…pediaGroup#1120)

Update `FlowSubscriptionExecutionStrategy` to support Kotlin `Flow` natively (i.e. convert publishers to flows vs old logic of converting flows to publishers). While the Reactor `Flux` has a concept of subscriber context (and has full interop with Kotlin `Flow`), generic `Publisher` does not. This means that whenever we convert to a publisher we loose any contextual data that was available. This PR makes minimal changes to get our Spring server working with the updated subscription execution strategy.

related: ExpediaGroup#1116
dariuszkuc added a commit to dariuszkuc/graphql-kotlin that referenced this pull request Aug 5, 2022
…pediaGroup#1120)

Update `FlowSubscriptionExecutionStrategy` to support Kotlin `Flow` natively (i.e. convert publishers to flows vs old logic of converting flows to publishers). While the Reactor `Flux` has a concept of subscriber context (and has full interop with Kotlin `Flow`), generic `Publisher` does not. This means that whenever we convert to a publisher we loose any contextual data that was available. This PR makes minimal changes to get our Spring server working with the updated subscription execution strategy.

related: ExpediaGroup#1116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes: major Changes require a major version module: generator Issue affects the schema generator and federation code module: server Issue affects the server code
Development

Successfully merging this pull request may close these issues.

2 participants