Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
elcharitas authored Aug 7, 2024
2 parents 6a6b041 + b1f4ecb commit 1acc008
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 62 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
- juniper
- juniper_subscriptions
- juniper_graphql_ws
- juniper_actix
#- juniper_actix
- juniper_axum
- juniper_hyper
- juniper_rocket
Expand All @@ -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
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions juniper/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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



Expand Down
3 changes: 3 additions & 0 deletions juniper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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)'] }
2 changes: 1 addition & 1 deletion juniper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"postinstall": "make graphiql graphql-playground"
},
"dependencies": {
"graphiql": "3.2.3",
"graphiql": "3.4.0",
"graphql-playground-react": "1.7.28"
}
}
4 changes: 2 additions & 2 deletions juniper/src/http/graphiql.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
favored resource bundler.
-->
<script
src="https://unpkg.com/graphiql@3.2.3/graphiql.min.js"
src="https://unpkg.com/graphiql@3.4.0/graphiql.min.js"
type="application/javascript"
></script>
<link rel="stylesheet" href="https://unpkg.com/graphiql@3.2.3/graphiql.min.css" />
<link rel="stylesheet" href="https://unpkg.com/graphiql@3.4.0/graphiql.min.css" />
<!--
These are imports for the GraphIQL Explorer plugin.
-->
Expand Down
16 changes: 15 additions & 1 deletion juniper_actix/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
[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
6 changes: 3 additions & 3 deletions juniper_actix/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 = [
Expand All @@ -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 }
Expand Down
6 changes: 3 additions & 3 deletions juniper_actix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]).

Expand All @@ -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).



Expand All @@ -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

4 changes: 2 additions & 2 deletions juniper_actix/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion juniper_axum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<S>(
Extension(schema): Extension<S>,
JuniperRequest(req): JuniperRequest<S::ScalarValue>,
Expand Down
17 changes: 0 additions & 17 deletions juniper_graphql_ws/src/graphql_transport_ws/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,23 +290,6 @@ impl<S: Schema, I: Init<S::ScalarValue, S::Context>> ConnectionState<S, I> {
}
}

struct InterruptableStream<S> {
stream: S,
rx: oneshot::Receiver<()>,
}

impl<S: Stream + Unpin> Stream for InterruptableStream<S> {
type Item = S::Item;

fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<Self::Item>> {
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<S: Schema> {
/// Init is the start before being polled for the first time.
Expand Down
17 changes: 0 additions & 17 deletions juniper_graphql_ws/src/graphql_ws/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,23 +260,6 @@ impl<S: Schema, I: Init<S::ScalarValue, S::Context>> ConnectionState<S, I> {
}
}

struct InterruptableStream<S> {
stream: S,
rx: oneshot::Receiver<()>,
}

impl<S: Stream + Unpin> Stream for InterruptableStream<S> {
type Item = S::Item;

fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<Self::Item>> {
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<S: Schema> {
/// Init is the start before being polled for the first time.
Expand Down
4 changes: 2 additions & 2 deletions juniper_warp/src/subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions tests/codegen/fail/union/struct_same_type_ugly.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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<S>`:
<&T as GraphQLObject<S>>
Expand All @@ -27,10 +27,10 @@ error[E0277]: the trait bound `std::string::String: GraphQLObject<__S>` is not s
<juniper::schema::model::TypeType<'a, S> as GraphQLObject<S>>

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<S>`:
<&T as GraphQLObject<S>>
Expand Down

0 comments on commit 1acc008

Please sign in to comment.