Skip to content

Commit

Permalink
Embed GraphQL playground into Raphtory UI (#1838)
Browse files Browse the repository at this point in the history
* embed graph playground into raphtory ui

* fix window bounds for the subgraph query
  • Loading branch information
ricopinazo authored Oct 24, 2024
1 parent 7727a75 commit 35a90a0
Show file tree
Hide file tree
Showing 4 changed files with 438 additions and 1,204 deletions.
703 changes: 436 additions & 267 deletions raphtory-graphql/resources/index.html

Large diffs are not rendered by default.

930 changes: 0 additions & 930 deletions raphtory-graphql/resources/playground.html

This file was deleted.

5 changes: 0 additions & 5 deletions raphtory-graphql/src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ pub(crate) async fn health() -> impl IntoResponse {
(StatusCode::OK, Json(health))
}

#[handler]
pub(crate) async fn graphql_playground() -> impl IntoResponse {
Html(include_str!("../resources/playground.html"))
}

#[handler]
pub(crate) async fn ui() -> impl IntoResponse {
Html(include_str!("../resources/index.html"))
Expand Down
4 changes: 2 additions & 2 deletions raphtory-graphql/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
App,
},
observability::open_telemetry::OpenTelemetry,
routes::{graphql_playground, health, ui},
routes::{health, ui},
server::ServerError::SchemaError,
};
use async_graphql_poem::GraphQL;
Expand Down Expand Up @@ -234,7 +234,7 @@ impl GraphServer {
.at("/", get(ui).post(GraphQL::new(schema)))
.at("/graph", get(ui))
.at("/search", get(ui))
.at("/playground", get(graphql_playground))
.at("/playground", get(ui))
.at("/health", get(health))
.with(CookieJarManager::new())
.with(Cors::new());
Expand Down

0 comments on commit 35a90a0

Please sign in to comment.