Skip to content

Commit

Permalink
[GraphQL] Add health endpoint to version routes as well (MystenLabs#1…
Browse files Browse the repository at this point in the history
…8580)

## 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 committed Jul 9, 2024
1 parent a5b8e86 commit 4f81707
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 @@ -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(),
Expand Down

0 comments on commit 4f81707

Please sign in to comment.