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

Upgrade async_tungstenite #52

Merged
merged 2 commits into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ all APIs might be changed.

## Unreleased - xxxx-xx-xx

## v0.6.0 - 2023-07-13

### Breaking Changes

- `async_tungstenite` dependency has been updated to 0.23, pulling in a tungstenite security fix

## v0.5.0 - 2023-07-13

### Breaking Changes
Expand Down Expand Up @@ -54,12 +60,12 @@ all APIs might be changed.

### Breaking Changes

- Clients are now created through builder types rather than directly. See the
- Clients are now created through builder types rather than directly. See the
`AsyncWebsocketClientBuilder` type (or it's `CynicClientBuilder` alias)
- `cynic` support is now behind the `client-cynic` feature.
- It's now recommended to use a custom impl of `futures::task::Spawn` for tokio
rather than the `async_executors` crate, as `async_executors` is not
compatible with `#[tokio::main]`. An example impl is provided for `tokio` in
compatible with `#[tokio::main]`. An example impl is provided for `tokio` in
the examples folder.

### New Features
Expand All @@ -70,7 +76,7 @@ all APIs might be changed.
a `Stream` but also exposes a `stop_operation` function that can be used to
tell the server to end the stream.
- `cynic` no longer requires the use of `async_executors` - it now only
requires an `impl futures::task::Spawn`. An example is included for tokio.
requires an `impl futures::task::Spawn`. An example is included for tokio.
Old code using the `AsyncStd` executor should continue to work but tokio
users are encouraged to provide their own using the example.

Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ thiserror = "1.0"
uuid = { version = "1.0", features = ["v4"] }

cynic = { version = "3", optional = true }
async-tungstenite = { version = "0.22", optional = true }
async-tungstenite = { version = "0.23", optional = true }
graphql_client = { version = "0.13.0", optional = true }

ws_stream_wasm = { version = "0.7", optional = true }
Expand All @@ -44,7 +44,7 @@ pharos = { version = "0.5.2", optional = true }
assert_matches = "1.5"
async-graphql = "5.0.10"
async-graphql-axum = "5"
async-tungstenite = { version = "0.22", features = ["tokio-runtime"] }
async-tungstenite = { version = "0.23", features = ["tokio-runtime"] }
axum = "0.6"
cynic = { version = "3" }
futures-util = "0.3"
Expand Down
4 changes: 2 additions & 2 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ edition = "2018"

[dependencies]
async-std = { version = "1.9", features = ["attributes"] }
async_executors = { version = "0.5", features = ["async_std"] }
async_executors = { version = "0.7", features = ["async_std"] }
cynic = { version = "3" }
futures = { version = "0.3"}

async-tungstenite = { version = "0.22", features = ["async-std-runtime", "tokio-runtime"] }
async-tungstenite = { version = "0.23", features = ["async-std-runtime", "tokio-runtime"] }
tokio = { version = "1.15", features = ["rt-multi-thread", "macros"] }

[dependencies.graphql-ws-client]
Expand Down
2 changes: 1 addition & 1 deletion tests/cynic-tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct BooksChangedSubscription {
}

#[tokio::test]
async fn main() {
async fn main_test() {
use async_tungstenite::tungstenite::{client::IntoClientRequest, http::HeaderValue};
use futures::StreamExt;
use graphql_ws_client::CynicClientBuilder;
Expand Down
Loading