Skip to content

Improve WebSocket integration #1191

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

Merged
merged 14 commits into from
Sep 21, 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
40 changes: 8 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
needs:
- bench
- clippy
- example
- feature
- msrv
- release-check
Expand Down Expand Up @@ -84,32 +83,6 @@ jobs:
- run: cargo clippy -p juniper_benchmarks --benches -- -D warnings
- run: cargo bench -p juniper_benchmarks

example:
strategy:
fail-fast: false
matrix:
example:
- actix_subscriptions
- basic_subscriptions
- warp_async
- warp_subscriptions
os:
- ubuntu
- macOS
- windows
toolchain:
- stable
- beta
- nightly
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}

- run: cargo check -p example_${{ matrix.example }}

feature:
strategy:
fail-fast: false
Expand Down Expand Up @@ -161,8 +134,9 @@ jobs:
- juniper_codegen
- juniper
- juniper_subscriptions
- juniper_graphql_transport_ws
- juniper_graphql_ws
- juniper_actix
#- juniper_actix
- juniper_hyper
#- juniper_iron
- juniper_rocket
Expand All @@ -171,6 +145,10 @@ jobs:
- ubuntu
- macOS
- windows
include:
- { msrv: "1.68.0", crate: "juniper_actix", os: "ubuntu" }
- { msrv: "1.68.0", crate: "juniper_actix", os: "macOS" }
- { msrv: "1.68.0", crate: "juniper_actix", os: "windows" }
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -184,9 +162,6 @@ jobs:
- run: cargo +nightly update -Z minimal-versions

- run: make test.cargo crate=${{ matrix.crate }}
if: ${{ !contains(fromJSON('["juniper_actix"]'), matrix.crate) }}
- run: cargo check -p ${{ matrix.crate }} --all-features
if: ${{ contains(fromJSON('["juniper_actix"]'), matrix.crate) }}

package:
if: ${{ startsWith(github.ref, 'refs/tags/juniper') }}
Expand Down Expand Up @@ -214,6 +189,7 @@ jobs:
- juniper_codegen
- juniper
- juniper_subscriptions
- juniper_graphql_transport_ws
- juniper_graphql_ws
- juniper_integration_tests
- juniper_codegen_tests
Expand Down Expand Up @@ -342,6 +318,7 @@ jobs:
- juniper_codegen
- juniper
- juniper_subscriptions
- juniper_graphql_transport_ws
- juniper_graphql_ws
- juniper_actix
- juniper_hyper
Expand All @@ -366,7 +343,6 @@ jobs:
needs:
- bench
- clippy
- example
- feature
- msrv
- package
Expand Down
6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
resolver = "1" # unifying Cargo features asap for Book tests
members = [
"benches",
"examples/basic_subscriptions",
"examples/warp_async",
"examples/warp_subscriptions",
"examples/actix_subscriptions",
"juniper_codegen",
"juniper",
"juniper_hyper",
"juniper_iron",
"juniper_rocket",
"juniper_subscriptions",
"juniper_graphql_ws",
"juniper_graphql_transport_ws",
"juniper_graphql_ws",
"juniper_warp",
"juniper_actix",
"tests/codegen",
Expand Down
4 changes: 2 additions & 2 deletions book/src/advanced/subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ async fn run_subscription() {
Currently there is an example of subscriptions with [warp][warp], but it still in an alpha state.
GraphQL over [WS][WS] is not fully supported yet and is non-standard.

- [Warp Subscription Example](https://github.com/graphql-rust/juniper/tree/master/examples/warp_subscriptions)
- [Small Example](https://github.com/graphql-rust/juniper/tree/master/examples/basic_subscriptions)
- [Warp Subscription Example](https://github.com/graphql-rust/juniper/tree/master/juniper_warp/examples/subscription.rs)
- [Small Example](https://github.com/graphql-rust/juniper/tree/master/juniper_subscriptions/examples/basic.rs)



Expand Down
7 changes: 4 additions & 3 deletions book/src/servers/warp.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ juniper = "0.16.0"
juniper_warp = "0.8.0"
```

Included in the source is a [small example][example] which sets up a basic GraphQL and [GraphiQL] handler.
Included in the source is a [small example][example] which sets up a basic GraphQL and [GraphiQL]/[GraphQL Playground] handlers with subscriptions support.

[graphiql]: https://github.com/graphql/graphiql
[GraphiQL]: https://github.com/graphql/graphiql
[GraphQL Playground]: https://github.com/prisma/graphql-playground
[hyper]: https://hyper.rs/
[warp]: https://crates.io/crates/warp
[juniper_warp]: https://github.com/graphql-rust/juniper/tree/master/juniper_warp
[example]: https://github.com/graphql-rust/juniper/blob/master/juniper_warp/examples/warp_server.rs
[example]: https://github.com/graphql-rust/juniper/blob/master/juniper_warp/examples/subscription.rs
56 changes: 0 additions & 56 deletions examples/README.md

This file was deleted.

21 changes: 0 additions & 21 deletions examples/actix_subscriptions/Cargo.toml

This file was deleted.

15 changes: 0 additions & 15 deletions examples/basic_subscriptions/Cargo.toml

This file was deleted.

17 changes: 0 additions & 17 deletions examples/warp_async/Cargo.toml

This file was deleted.

104 changes: 0 additions & 104 deletions examples/warp_async/src/main.rs

This file was deleted.

20 changes: 0 additions & 20 deletions examples/warp_subscriptions/Cargo.toml

This file was deleted.

Loading