Skip to content
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

An easier one shot subscribe API #65

Merged
merged 10 commits into from
Feb 10, 2024
Merged

An easier one shot subscribe API #65

merged 10 commits into from
Feb 10, 2024

Conversation

obmarg
Copy link
Owner

@obmarg obmarg commented Feb 3, 2024

graphql-ws-client was designed to allow multiple subscriptions to be run on a single connection. This is still something I want to support, but it's also common for users to only want to run a single subscription per connection. Right now the API for doing that is a bit too verbose.

This PR will introduce a streaming_operation function on the ClientBuilder to handle this use case, combining the connect, subscribe and actor spawning into a single function call.

Todo:

  • Examples
  • Tests
  • Changelog

@obmarg obmarg mentioned this pull request Feb 3, 2024
25 tasks
@obmarg obmarg changed the title An easier one-shot subscribe API An easier one shot subscribe API Feb 3, 2024
src/next/builder.rs Outdated Show resolved Hide resolved
@obmarg obmarg marked this pull request as ready for review February 10, 2024 13:26
@obmarg obmarg merged commit d27829b into main Feb 10, 2024
2 checks passed
@obmarg obmarg deleted the obmarg/push-luxrywlwzpqk branch February 10, 2024 14:10
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.

1 participant