Skip to content

Commit

Permalink
[GraphQL] Remove version related routes (#19410)
Browse files Browse the repository at this point in the history
## Description 

Removes the version related routes.

## Test plan 

Existing tests

---

## 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: GraphQL only supports one version instead of `beta,
stable, legacy`. This change removes the previous routes and only allows
for `/` and `/graphql`, which will always point to the latest version.
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
  • Loading branch information
stefan-mysten authored Sep 17, 2024
1 parent 02dbe53 commit a725da9
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions crates/sui-graphql-rpc/src/server/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,9 @@ impl ServerBuilder {
if self.router.is_none() {
let router: Router = Router::new()
.route("/", post(graphql_handler))
.route("/:version", post(graphql_handler))
.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 a725da9

Please sign in to comment.