fix(webserver): make GET /graphql route an api route (so it's valid through cors) (#858)

r0.6
Meng Zhang 2023-11-22 07:08:27 +08:00 committed by GitHub
parent 2b785e8b80
commit bb534fae27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -46,11 +46,11 @@ pub async fn attach_webserver(
"/graphql",
routing::post(graphql::<Arc<Schema>>).with_state(ctx.clone()),
)
.route("/graphql", routing::get(playground("/graphql", None)))
.layer(Extension(schema))
.route("/hub", routing::get(ws_handler).with_state(ctx));
let ui = ui
.route("/graphql", routing::get(playground("/graphql", None)))
.route("/graphiql", routing::get(graphiql("/graphql", None)))
.fallback(ui::handler);