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

chore(deps): upgrade axum to v0.6.1 #2303

Merged
merged 6 commits into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
74 changes: 17 additions & 57 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@ Description! And a link to a [reference](http://url)
By [@USERNAME](https://github.com/USERNAME) in https://github.com/apollographql/router/pull/PULL_NUMBER
-->

# [1.8.0] (unreleased) - 2022-mm-dd

## 🚀 Features

### Add support for single instance Redis ([Issue #2300](https://github.com/apollographql/router/issues/2300))

For `experimental_cache` with redis caching it now works with only a single Redis instance if you provide only one URL.

By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/2310
By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/2310

## 🛠 Maintenance

### Upgrade axum to `0.6.1` ([PR #2303](https://github.com/apollographql/router/pull/2303))

For more details about the new axum release, please read the [changelog](https://github.com/tokio-rs/axum/releases/tag/axum-v0.6.0)

By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/2303
2 changes: 1 addition & 1 deletion apollo-router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async-compression = { version = "0.3.15", features = [
] }
async-trait = "0.1.60"
atty = "0.2.14"
axum = { version = "0.5.17", features = ["headers", "json", "original-uri"] }
axum = { version = "0.6.1", features = ["headers", "json", "original-uri"] }
backtrace = "0.3.67"
base64 = "0.20.0"
buildstructor = "0.5.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ where
graphql_configuration.path = format!("{}router_extra_path", graphql_configuration.path);
}

Router::<hyper::Body>::new().route(
Router::new().route(
&graphql_configuration.path,
get({
move |Extension(service): Extension<RF>, request: Request<Body>| {
Expand Down
4 changes: 2 additions & 2 deletions apollo-router/src/axum_factory/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ async fn cors_preflight() -> Result<(), ApolloRouterError> {
.cors(Cors::builder().build())
.supergraph(
crate::configuration::Supergraph::fake_builder()
.path(String::from("/graphql/*"))
.path(String::from("/graphql"))
bnjjj marked this conversation as resolved.
Show resolved Hide resolved
.build(),
)
.build()
Expand All @@ -910,7 +910,7 @@ async fn cors_preflight() -> Result<(), ApolloRouterError> {
.request(
Method::OPTIONS,
&format!(
"{}/graphql/",
"{}/graphql",
server.graphql_listen_address().as_ref().unwrap()
),
)
Expand Down
2 changes: 1 addition & 1 deletion apollo-router/src/router_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl Endpoint {
.into_response())
}
};
axum::Router::new().route(self.path.as_str(), service_fn(handler))
axum::Router::new().route_service(self.path.as_str(), service_fn(handler))
}
}
/// Factory for creating a RouterService
Expand Down
4 changes: 2 additions & 2 deletions apollo-router/tests/apollo_reports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ use apollo_router::services::router;
use apollo_router::services::router::BoxCloneService;
use apollo_router::services::supergraph;
use apollo_router::TestHarness;
use axum::body::Bytes;
use axum::routing::post;
use axum::Extension;
use axum::Json;
use bytes::Bytes;
use flate2::read::GzDecoder;
use http::header::ACCEPT;
use once_cell::sync::Lazy;
Expand Down Expand Up @@ -142,8 +142,8 @@ pub(crate) mod proto {
}

async fn report(
bytes: Bytes,
Extension(state): Extension<Arc<Mutex<Vec<Report>>>>,
bytes: Bytes,
) -> Result<Json<()>, http::StatusCode> {
let mut gz = GzDecoder::new(&*bytes);
let mut buf = Vec::new();
Expand Down