-
Notifications
You must be signed in to change notification settings - Fork 428
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
Axum integration #1088
Merged
Merged
Axum integration #1088
Changes from 7 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
bc7f4a8
Add Error to Connection Stream
btielen 11ecc25
Add post_with_variables test
btielen 2932e6e
Decouple test and implementation
btielen 719eb97
Add juniper_axum
btielen 183302c
Clippy and format
btielen f9326e5
Merge branch 'master' into axum
ilslv 59ab64a
Corrections
ilslv 7414b4c
Update juniper_axum/README.md
LegNeato e1a1104
Update juniper_warp/src/lib.rs
LegNeato fbef4c0
Merge branch 'master' into axum
tyranron b5d5be8
Revert unrelevant changes
tyranron f5b0d70
Add to CI
tyranron 2691dc4
Tune up deps
tyranron 5f50474
Refactor solution, vol.1
tyranron 224e30c
Refactor solution, vol.2 [skip ci]
tyranron 072717e
Get rid of `GetQueryVariables`
tyranron aa03df3
Get rid of `JsonRequestBody` [skip ci]
tyranron baea7e6
Parametrize with `ScalarValue`
tyranron 8961631
Fix `extract` unit tests
tyranron 2a819fd
Rework `graphql-ws` subscriptions
tyranron ac97a3a
Fix doc tests
tyranron 4600686
Add `graphql-transport-ws` impl
tyranron 3b3e7e3
Impl auto-selection between new `graphql-transport-ws` and old `graph…
tyranron 4d89d51
Add ready-to-go `graphql` handler
tyranron ccac700
Add ready-to-go `ws`, `graphql_ws` and `graphql_transport_ws` handlers
tyranron fa73e0b
Fix docs
tyranron 5491556
Add `release.toml` [skip ci]
tyranron 90bcc3c
Update workspace
tyranron cac125f
Rework `simple` example
tyranron afa9521
Rework `strawars` example as `custom`
tyranron e2561c7
Reworking integration tests, vol.1
tyranron 8ba8de5
Reworking integration tests, vol.2
tyranron c44f5cd
Fill-up CHANGELOG
tyranron c9cf94e
Fix tests
tyranron bb6dcaa
Try fix MSRV
tyranron File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
`juniper_axum` changelog | ||
======================== | ||
|
||
All user visible changes to `juniper_axum` crate will be documented in this file. This project uses [Semantic Versioning 2.0.0]. | ||
|
||
|
||
|
||
|
||
[`juniper` crate]: https://docs.rs/juniper | ||
[Semantic Versioning 2.0.0]: https://semver.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[package] | ||
name = "juniper_axum" | ||
version = "0.1.0" | ||
edition = "2021" | ||
rust-version = "1.62" | ||
description = "`juniper` GraphQL integration with `axum`." | ||
license = "BSD-2-Clause" | ||
authors = ["Benno Tielen <[email protected]>"] | ||
documentation = "https://docs.rs/juniper_axum" | ||
homepage = "https://github.com/graphql-rust/juniper/tree/master/juniper_axum" | ||
repository = "https://github.com/graphql-rust/juniper" | ||
readme = "README.md" | ||
categories = ["asynchronous", "web-programming", "web-programming::http-server"] | ||
keywords = ["graphql", "juniper", "axum", "websocket"] | ||
exclude = ["/release.toml"] | ||
|
||
[dependencies] | ||
axum = { version = "0.5.11", features = ["ws"] } | ||
juniper = { path = "../juniper" } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As mentioned in the PR comments already, this should have a version and wired up to the release machinery. |
||
serde = "1.0" | ||
serde_json = "1.0" | ||
juniper_graphql_ws = { path = "../juniper_graphql_ws" } | ||
futures = "0.3" | ||
|
||
[dev-dependencies] | ||
tokio = { version = "1.20", features = ["full"] } | ||
tokio-tungstenite = "0.17.2" | ||
tokio-stream = "0.1.9" | ||
tower = "0.4.13" | ||
hyper = "0.14.20" | ||
juniper = { path = "../juniper", features = ["expose-test-schema"] } | ||
anyhow = "1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
BSD 2-Clause License | ||
|
||
Copyright (c) 2022, Benno Tielen | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a version required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@btielen in the same way as other integrations have. The version bump is automated with
cargo-release
. Seerelease.toml
files for examples.