Skip to content

Commit

Permalink
[GraphQL] Add health endpoint to version routes as well (#18580)
Browse files Browse the repository at this point in the history
## 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:
  • Loading branch information
stefan-mysten authored Jul 9, 2024
1 parent 0f27a97 commit c99b99f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/sui-graphql-rpc/src/server/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,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(),
Expand Down

0 comments on commit c99b99f

Please sign in to comment.