diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac21383b9..c602cee28 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -150,7 +150,7 @@ jobs: - juniper - juniper_subscriptions - juniper_graphql_ws - - juniper_actix + #- juniper_actix - juniper_axum - juniper_hyper - juniper_rocket @@ -159,6 +159,10 @@ jobs: - ubuntu - macOS - windows + include: + - { msrv: "1.75.0", crate: "juniper_actix", os: "ubuntu" } + - { msrv: "1.75.0", crate: "juniper_actix", os: "macOS" } + - { msrv: "1.75.0", crate: "juniper_actix", os: "windows" } runs-on: ${{ matrix.os }}-latest steps: - uses: actions/checkout@v4 @@ -172,10 +176,6 @@ jobs: - run: cargo +nightly update -Z minimal-versions - run: make test.cargo crate=${{ matrix.crate }} - if: ${{ matrix.crate != 'juniper_actix' }} - # TODO: Remove once MSRV bumps up >=1.75. - - run: cargo check -p ${{ matrix.crate }} --all-features - if: ${{ matrix.crate == 'juniper_actix' }} package: name: check (package) diff --git a/juniper/CHANGELOG.md b/juniper/CHANGELOG.md index b488874e0..1c563baa8 100644 --- a/juniper/CHANGELOG.md +++ b/juniper/CHANGELOG.md @@ -17,10 +17,10 @@ All user visible changes to `juniper` crate will be documented in this file. Thi ### Changed -- Updated [GraphiQL] to [3.2.3 version](https://github.com/graphql/graphiql/blob/graphiql%403.2.2/packages/graphiql/CHANGELOG.md#322). ([#1260]) +- Updated [GraphiQL] to [3.4.0 version](https://github.com/graphql/graphiql/blob/graphiql%403.4.0/packages/graphiql/CHANGELOG.md#340). ([#1269]) [#1252]: /../../pull/1252 -[#1260]: /../../pull/1260 +[#1269]: /../../pull/1269 diff --git a/juniper/Cargo.toml b/juniper/Cargo.toml index 9ff926d43..f12400b53 100644 --- a/juniper/Cargo.toml +++ b/juniper/Cargo.toml @@ -85,3 +85,6 @@ tokio = { version = "1.0", features = ["macros", "time", "rt-multi-thread"] } name = "bench" harness = false path = "benches/bench.rs" + +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = ['cfg(nightly)'] } diff --git a/juniper/package.json b/juniper/package.json index 87da5f1f9..eb4a46f19 100644 --- a/juniper/package.json +++ b/juniper/package.json @@ -4,7 +4,7 @@ "postinstall": "make graphiql graphql-playground" }, "dependencies": { - "graphiql": "3.2.3", + "graphiql": "3.4.0", "graphql-playground-react": "1.7.28" } } diff --git a/juniper/src/http/graphiql.html b/juniper/src/http/graphiql.html index d8bd30869..7cf55dec1 100644 --- a/juniper/src/http/graphiql.html +++ b/juniper/src/http/graphiql.html @@ -42,10 +42,10 @@ favored resource bundler. --> - + diff --git a/juniper_actix/CHANGELOG.md b/juniper_actix/CHANGELOG.md index a8f65c847..e478340f4 100644 --- a/juniper_actix/CHANGELOG.md +++ b/juniper_actix/CHANGELOG.md @@ -6,6 +6,19 @@ All user visible changes to `juniper_actix` crate will be documented in this fil +## [0.6.0] · 2024-07-23 +[0.6.0]: /../../tree/juniper_actix-v0.6.0/juniper_actix + +### BC Breaks + +- Switched to 0.3 version of [`actix-ws` crate]. ([#1267]) +- Bumped up [MSRV] to 1.75 due to [`actix-ws` crate] requirements. ([#1267]) + +[#1267]: /../../pull/1267 + + + + ## [0.5.0] · 2024-03-20 [0.5.0]: /../../tree/juniper_actix-v0.5.0/juniper_actix @@ -49,4 +62,5 @@ See [old CHANGELOG](/../../blob/juniper_actix-v0.4.0/juniper_actix/CHANGELOG.md) [`juniper_graphql_ws` crate]: https://docs.rs/juniper_graphql_ws [Semantic Versioning 2.0.0]: https://semver.org [graphql-transport-ws]: https://github.com/enisdenjo/graphql-ws/blob/v5.14.0/PROTOCOL.md -[graphql-ws]: https://github.com/apollographql/subscriptions-transport-ws/blob/v0.11.0/PROTOCOL.md \ No newline at end of file +[graphql-ws]: https://github.com/apollographql/subscriptions-transport-ws/blob/v0.11.0/PROTOCOL.md +[MSRV]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field diff --git a/juniper_actix/Cargo.toml b/juniper_actix/Cargo.toml index e45c7d9ef..c68b2a2de 100644 --- a/juniper_actix/Cargo.toml +++ b/juniper_actix/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "juniper_actix" -version = "0.5.0" +version = "0.6.0" edition = "2021" -rust-version = "1.73" +rust-version = "1.75" description = "`juniper` GraphQL integration with `actix-web`." license = "BSD-2-Clause" authors = [ @@ -27,7 +27,7 @@ subscriptions = ["dep:actix-ws", "dep:juniper_graphql_ws"] [dependencies] actix-http = "3.2" actix-web = "4.4" -actix-ws = { version = "0.2", optional = true } +actix-ws = { version = "0.3", optional = true } anyhow = "1.0.47" futures = "0.3.22" juniper = { version = "0.16", path = "../juniper", default-features = false } diff --git a/juniper_actix/README.md b/juniper_actix/README.md index 1932d5d7b..f778ef1d5 100644 --- a/juniper_actix/README.md +++ b/juniper_actix/README.md @@ -6,7 +6,7 @@ [![CI](https://github.com/graphql-rust/juniper/workflows/CI/badge.svg?branch=master "CI")](https://github.com/graphql-rust/juniper/actions?query=workflow%3ACI+branch%3Amaster) [![Rust 1.73+](https://img.shields.io/badge/rustc-1.73+-lightgray.svg "Rust 1.73+")](https://blog.rust-lang.org/2023/10/05/Rust-1.73.0.html) -- [Changelog](https://github.com/graphql-rust/juniper/blob/juniper_actix-v0.5.0/juniper_actix/CHANGELOG.md) +- [Changelog](https://github.com/graphql-rust/juniper/blob/juniper_actix-v0.6.0/juniper_actix/CHANGELOG.md) [`actix-web`] web server integration for [`juniper`] ([GraphQL] implementation for [Rust]). @@ -33,7 +33,7 @@ Check [`examples/subscription.rs`][1] for example code of a working [`actix-web` ## License -This project is licensed under [BSD 2-Clause License](https://github.com/graphql-rust/juniper/blob/juniper_actix-v0.5.0/juniper_actix/LICENSE). +This project is licensed under [BSD 2-Clause License](https://github.com/graphql-rust/juniper/blob/juniper_actix-v0.6.0/juniper_actix/LICENSE). @@ -46,5 +46,5 @@ This project is licensed under [BSD 2-Clause License](https://github.com/graphql [Juniper Book]: https://graphql-rust.github.io/juniper [Rust]: https://www.rust-lang.org -[1]: https://github.com/graphql-rust/juniper/blob/juniper_actix-v0.5.0/juniper_actix/examples/subscription.rs +[1]: https://github.com/graphql-rust/juniper/blob/juniper_actix-v0.6.0/juniper_actix/examples/subscription.rs diff --git a/juniper_actix/src/lib.rs b/juniper_actix/src/lib.rs index 4e8e63315..781062007 100644 --- a/juniper_actix/src/lib.rs +++ b/juniper_actix/src/lib.rs @@ -230,8 +230,8 @@ pub mod subscriptions { /// an authentication based on the parameters provided by a client. /// /// > __WARNING__: This protocol has been deprecated in favor of the - /// [new `graphql-transport-ws` GraphQL over WebSocket Protocol][new], which is - /// provided by the [`graphql_transport_ws_handler()`] function. + /// > [new `graphql-transport-ws` GraphQL over WebSocket Protocol][new], which is + /// > provided by the [`graphql_transport_ws_handler()`] function. /// /// [new]: https://github.com/enisdenjo/graphql-ws/blob/v5.14.0/PROTOCOL.md /// [old]: https://github.com/apollographql/subscriptions-transport-ws/blob/v0.11.0/PROTOCOL.md diff --git a/juniper_axum/src/lib.rs b/juniper_axum/src/lib.rs index 205669a67..20c2099f5 100644 --- a/juniper_axum/src/lib.rs +++ b/juniper_axum/src/lib.rs @@ -67,7 +67,6 @@ pub use self::subscriptions::{graphql_transport_ws, graphql_ws, ws}; /// /// [`extract`]: axum::extract /// [`Handler`]: axum::handler::Handler -#[cfg_attr(text, axum::debug_handler)] pub async fn graphql( Extension(schema): Extension, JuniperRequest(req): JuniperRequest, diff --git a/juniper_graphql_ws/src/graphql_transport_ws/mod.rs b/juniper_graphql_ws/src/graphql_transport_ws/mod.rs index 8553c189a..365f6037b 100644 --- a/juniper_graphql_ws/src/graphql_transport_ws/mod.rs +++ b/juniper_graphql_ws/src/graphql_transport_ws/mod.rs @@ -290,23 +290,6 @@ impl> ConnectionState { } } -struct InterruptableStream { - stream: S, - rx: oneshot::Receiver<()>, -} - -impl Stream for InterruptableStream { - type Item = S::Item; - - fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { - match Pin::new(&mut self.rx).poll(cx) { - Poll::Ready(_) => return Poll::Ready(None), - Poll::Pending => {} - } - Pin::new(&mut self.stream).poll_next(cx) - } -} - /// SubscriptionStartState is the state for a subscription operation. enum SubscriptionStartState { /// Init is the start before being polled for the first time. diff --git a/juniper_graphql_ws/src/graphql_ws/mod.rs b/juniper_graphql_ws/src/graphql_ws/mod.rs index 87950717b..fcc30afec 100644 --- a/juniper_graphql_ws/src/graphql_ws/mod.rs +++ b/juniper_graphql_ws/src/graphql_ws/mod.rs @@ -260,23 +260,6 @@ impl> ConnectionState { } } -struct InterruptableStream { - stream: S, - rx: oneshot::Receiver<()>, -} - -impl Stream for InterruptableStream { - type Item = S::Item; - - fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { - match Pin::new(&mut self.rx).poll(cx) { - Poll::Ready(_) => return Poll::Ready(None), - Poll::Pending => {} - } - Pin::new(&mut self.stream).poll_next(cx) - } -} - /// SubscriptionStartState is the state for a subscription operation. enum SubscriptionStartState { /// Init is the start before being polled for the first time. diff --git a/juniper_warp/src/subscriptions.rs b/juniper_warp/src/subscriptions.rs index 6511c235f..d54597e4f 100644 --- a/juniper_warp/src/subscriptions.rs +++ b/juniper_warp/src/subscriptions.rs @@ -232,8 +232,8 @@ where /// an authentication based on the parameters provided by a client. /// /// > __WARNING__: This protocol has been deprecated in favor of the -/// [new `graphql-transport-ws` GraphQL over WebSocket Protocol][new], which is -/// provided by the [`serve_graphql_transport_ws()`] function. +/// > [new `graphql-transport-ws` GraphQL over WebSocket Protocol][new], which is +/// > provided by the [`serve_graphql_transport_ws()`] function. /// /// [new]: https://github.com/enisdenjo/graphql-ws/blob/v5.14.0/PROTOCOL.md /// [old]: https://github.com/apollographql/subscriptions-transport-ws/blob/v0.11.0/PROTOCOL.md diff --git a/tests/codegen/fail/union/struct_same_type_ugly.stderr b/tests/codegen/fail/union/struct_same_type_ugly.stderr index 8e0ca39a2..bc6c8e81f 100644 --- a/tests/codegen/fail/union/struct_same_type_ugly.stderr +++ b/tests/codegen/fail/union/struct_same_type_ugly.stderr @@ -10,10 +10,10 @@ error[E0119]: conflicting implementations of trait `MutuallyExclusive` for type = note: this error originates in the macro `::juniper::sa::assert_type_ne_all` which comes from the expansion of the derive macro `GraphQLUnion` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `std::string::String: GraphQLObject<__S>` is not satisfied - --> fail/union/struct_same_type_ugly.rs:4:14 + --> fail/union/struct_same_type_ugly.rs:5:14 | -4 | #[graphql(on String = Character::a)] - | ^^^^^^ the trait `GraphQLObject<__S>` is not implemented for `std::string::String` +5 | #[graphql(on std::string::String = Character::b)] + | ^^^^^^^^^^^^^^^^^^^ the trait `GraphQLObject<__S>` is not implemented for `std::string::String` | = help: the following other types implement trait `GraphQLObject`: <&T as GraphQLObject> @@ -27,10 +27,10 @@ error[E0277]: the trait bound `std::string::String: GraphQLObject<__S>` is not s as GraphQLObject> error[E0277]: the trait bound `std::string::String: GraphQLObject<__S>` is not satisfied - --> fail/union/struct_same_type_ugly.rs:5:14 + --> fail/union/struct_same_type_ugly.rs:4:14 | -5 | #[graphql(on std::string::String = Character::b)] - | ^^^^^^^^^^^^^^^^^^^ the trait `GraphQLObject<__S>` is not implemented for `std::string::String` +4 | #[graphql(on String = Character::a)] + | ^^^^^^ the trait `GraphQLObject<__S>` is not implemented for `std::string::String` | = help: the following other types implement trait `GraphQLObject`: <&T as GraphQLObject>