From dde6f14fb1c0078f5012c7b688c0e04e1a1b902f Mon Sep 17 00:00:00 2001 From: stefan-mysten <135084671+stefan-mysten@users.noreply.github.com> Date: Wed, 10 Jul 2024 08:16:14 -0700 Subject: [PATCH] [cherry-pick][GraphQL] Cherry pick health endpoint on versioned routes to 2024.4.0 (#18581) ## Description Add health endpoint to version routes as well. ## Test plan How did you test the new or updated feature? --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [x] GraphQL: Added the health endpoint to version routes as well. - [ ] CLI: - [ ] Rust SDK: --- crates/sui-graphql-rpc/src/server/builder.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/sui-graphql-rpc/src/server/builder.rs b/crates/sui-graphql-rpc/src/server/builder.rs index fc160bcb269c2..c5069aa2e0e20 100644 --- a/crates/sui-graphql-rpc/src/server/builder.rs +++ b/crates/sui-graphql-rpc/src/server/builder.rs @@ -256,6 +256,8 @@ impl ServerBuilder { .route("/graphql", post(graphql_handler)) .route("/graphql/:version", post(graphql_handler)) .route("/health", get(health_check)) + .route("/graphql/health", get(health_check)) + .route("/graphql/:version/health", get(health_check)) .with_state(self.state.clone()) .route_layer(CallbackLayer::new(MetricsMakeCallbackHandler { metrics: self.state.metrics.clone(),