Skip to content

Abstract out FlowSubscriptionExecutionStrategy #1116

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

Conversation

josephlbarnett
Copy link
Contributor

Put common methods in a base class and add an implementation
for a NativeFlowSubscriptionExecutionStrategy that returns
Flows instead of Publishers.

📝 Description

Refactors FlowSubscriptionStrategy to allow for a NativeFlowSubscriptionStrategy
without too much copy/paste (although the base bits are still copy/pasting from graphql-java).
Possibly FlowSubscriptionStrategy could be renamed PublisherFlowSubscriptionStrategy but
not sure what makes the most sense there. Also the new test is basically a copy/paste of the
existing test, with getData<Publisher<>> changed to getData<Flow<>>, not sure if there's
a good way to clean that up.

🔗 Related Issues

#358
#972

Put common methods in a base class and add an implementation
for a NativeFlowSubscriptionExecutionStrategy that returns
Flows instead of Publishers.
@josephlbarnett josephlbarnett force-pushed the publisher-flow-subscription-strategies branch from b8abd2b to c2789df Compare April 9, 2021 20:57
dariuszkuc pushed a commit to dariuszkuc/graphql-kotlin that referenced this pull request Apr 19, 2021
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 pushed a commit to dariuszkuc/graphql-kotlin that referenced this pull request Apr 19, 2021
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
smyrick pushed a commit that referenced this pull request Apr 19, 2021
)

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: #1116
@dariuszkuc
Copy link
Collaborator

Reverted the changes from #972 in #1120

@dariuszkuc dariuszkuc closed this Apr 19, 2021
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants