From 728efa83980ca45a5256183803b20d5607699fd1 Mon Sep 17 00:00:00 2001 From: Shane Myrick Date: Wed, 5 Feb 2025 11:24:57 -0800 Subject: [PATCH 1/6] Update query-batching with billable details --- docs/source/routing/performance/query-batching.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/source/routing/performance/query-batching.mdx b/docs/source/routing/performance/query-batching.mdx index 50530f8797..e10d72b9d2 100644 --- a/docs/source/routing/performance/query-batching.mdx +++ b/docs/source/routing/performance/query-batching.mdx @@ -191,6 +191,9 @@ To enable batching in an Apollo client, configure `BatchHttpLink`. For details o If the router receives a query batch from a client, and batching is *not* enabled, the router sends a `BATCHING_NOT_ENABLED` error to the client. +## Query Batching and Paid Plans +When processing batched operations, the Router will count each entry in the batch as a distinct billable operation that counts towards your graph usage. Even if you send a batch with `N` requests of the same exact operation, that is counted the same as sending `N` of the same non-batched requests. Note that billable plans only track Router operations, so configuring subgraph batching does not impact your graph usage count. + ## Metrics for query batching Metrics in the GraphOS Router for query batching: From ef8438afd06db81a89895594bf10cd6fc3f4bbd1 Mon Sep 17 00:00:00 2001 From: Shane Myrick Date: Wed, 5 Feb 2025 11:27:30 -0800 Subject: [PATCH 2/6] Update query-batching.mdx --- docs/source/routing/performance/query-batching.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/routing/performance/query-batching.mdx b/docs/source/routing/performance/query-batching.mdx index e10d72b9d2..c4c41aaaea 100644 --- a/docs/source/routing/performance/query-batching.mdx +++ b/docs/source/routing/performance/query-batching.mdx @@ -191,8 +191,8 @@ To enable batching in an Apollo client, configure `BatchHttpLink`. For details o If the router receives a query batch from a client, and batching is *not* enabled, the router sends a `BATCHING_NOT_ENABLED` error to the client. -## Query Batching and Paid Plans -When processing batched operations, the Router will count each entry in the batch as a distinct billable operation that counts towards your graph usage. Even if you send a batch with `N` requests of the same exact operation, that is counted the same as sending `N` of the same non-batched requests. Note that billable plans only track Router operations, so configuring subgraph batching does not impact your graph usage count. +## Query Batching and GraphOS Plans +When processing batched operations, the Router will count each entry in the batch as a distinct billable operation that counts towards your graph usage. Even if you send a batch with `N` requests of the same exact operation, that is counted the same as sending `N` requests of the same non-batched operation. Note that GraphOS plans only track Router operations, so configuring subgraph batching does not impact your graph usage count. ## Metrics for query batching From d6f60f7bfec42d01921f4f83fc60cf3c043522b0 Mon Sep 17 00:00:00 2001 From: Shane Myrick Date: Wed, 5 Feb 2025 11:29:30 -0800 Subject: [PATCH 3/6] Update query-batching.mdx --- docs/source/routing/performance/query-batching.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/routing/performance/query-batching.mdx b/docs/source/routing/performance/query-batching.mdx index c4c41aaaea..64d6169002 100644 --- a/docs/source/routing/performance/query-batching.mdx +++ b/docs/source/routing/performance/query-batching.mdx @@ -192,7 +192,7 @@ To enable batching in an Apollo client, configure `BatchHttpLink`. For details o If the router receives a query batch from a client, and batching is *not* enabled, the router sends a `BATCHING_NOT_ENABLED` error to the client. ## Query Batching and GraphOS Plans -When processing batched operations, the Router will count each entry in the batch as a distinct billable operation that counts towards your graph usage. Even if you send a batch with `N` requests of the same exact operation, that is counted the same as sending `N` requests of the same non-batched operation. Note that GraphOS plans only track Router operations, so configuring subgraph batching does not impact your graph usage count. +When processing batched operations, the Router will count each entry in the batch as a distinct billable operation that counts towards your graph usage. Even if you send a batch with size `N` of operations, that is counted the same as sending `N` requests of the same non-batched operation. Note that GraphOS plans only track Router operations, so configuring subgraph batching does not impact your graph usage count. ## Metrics for query batching From de906f2f2cec3930268f4f0d13be758fa44a6d9e Mon Sep 17 00:00:00 2001 From: Shane Myrick Date: Wed, 5 Feb 2025 11:51:37 -0800 Subject: [PATCH 4/6] Update docs/source/routing/performance/query-batching.mdx Co-authored-by: Edward Huang --- docs/source/routing/performance/query-batching.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/source/routing/performance/query-batching.mdx b/docs/source/routing/performance/query-batching.mdx index 64d6169002..e320826a81 100644 --- a/docs/source/routing/performance/query-batching.mdx +++ b/docs/source/routing/performance/query-batching.mdx @@ -191,8 +191,10 @@ To enable batching in an Apollo client, configure `BatchHttpLink`. For details o If the router receives a query batch from a client, and batching is *not* enabled, the router sends a `BATCHING_NOT_ENABLED` error to the client. -## Query Batching and GraphOS Plans -When processing batched operations, the Router will count each entry in the batch as a distinct billable operation that counts towards your graph usage. Even if you send a batch with size `N` of operations, that is counted the same as sending `N` requests of the same non-batched operation. Note that GraphOS plans only track Router operations, so configuring subgraph batching does not impact your graph usage count. +## Query batching and GraphOS plans +When processing batched operations, the router counts each entry in the batch as a distinct billable operation that counts towards your graph usage. Sending a batch with `N` operations is counted the same as sending `N` requests of the same non-batched operation. + +Note that GraphOS plans only track router operations, so configuring subgraph batching does not impact your graph usage count. ## Metrics for query batching From 781c8ad59b062178e21b016671f5907af7bf74ce Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 10 Feb 2025 15:01:37 +0100 Subject: [PATCH 5/6] Use HTTP 503 Service Unavailable for free plan rate limit (#6753) --- apollo-router/src/plugins/router_limits/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apollo-router/src/plugins/router_limits/mod.rs b/apollo-router/src/plugins/router_limits/mod.rs index 008cd99194..50d99a81ff 100644 --- a/apollo-router/src/plugins/router_limits/mod.rs +++ b/apollo-router/src/plugins/router_limits/mod.rs @@ -81,7 +81,7 @@ impl PluginPrivate for RouterLimits { .extension_code(extension_code) .build(); Ok(RouterResponse::error_builder() - .status_code(StatusCode::TOO_MANY_REQUESTS) + .status_code(StatusCode::SERVICE_UNAVAILABLE) .error(error) .context(ctx) .build() @@ -158,7 +158,7 @@ mod test { // * the third, delayed req succeeds assert!(r1.is_ok_and(|resp| resp.response.status().is_success())); - assert!(r2.is_ok_and(|resp| resp.response.status() == StatusCode::TOO_MANY_REQUESTS)); + assert!(r2.is_ok_and(|resp| resp.response.status() == StatusCode::SERVICE_UNAVAILABLE)); assert!(r3 .await .is_ok_and(|resp| resp.response.status().is_success())); From 85976da3ba3cf040d46e953baceba7f1916dd3a3 Mon Sep 17 00:00:00 2001 From: Duckki Oe Date: Tue, 11 Feb 2025 01:23:14 -0800 Subject: [PATCH 6/6] fix: fixed the compliance error (RUSTSEC-2025-0006) (#6756) --- Cargo.lock | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 62d471d177..cedc725a1d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3209,9 +3209,9 @@ dependencies = [ [[package]] name = "hickory-proto" -version = "0.24.1" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07698b8420e2f0d6447a436ba999ec85d8fbf2a398bbd737b82cac4a2e96e512" +checksum = "2ad3d6d98c648ed628df039541a5577bee1a7c83e9e16fe3dbedeea4cdfeb971" dependencies = [ "async-trait", "cfg-if", @@ -3220,7 +3220,7 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "idna 0.4.0", + "idna", "ipnet", "once_cell", "rand 0.8.5", @@ -3677,16 +3677,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "idna" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "1.0.3" @@ -4050,7 +4040,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -5222,7 +5212,7 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0f3e5beed80eb580c68e2c600937ac2c4eedabdfd5ef1e5b7ea4f3fba84497b" dependencies = [ - "heck 0.5.0", + "heck 0.4.1", "itertools 0.13.0", "log", "multimap 0.10.0", @@ -7524,27 +7514,12 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-ident" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-width" version = "0.1.14" @@ -7564,7 +7539,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", - "idna 1.0.3", + "idna", "percent-encoding", "serde", ]