Skip to content

Commit

Permalink
fix(webserver): make GET /graphql route an api route (so it's valid t…
Browse files Browse the repository at this point in the history
…hrough cors)
  • Loading branch information
wsxiaoys committed Nov 21, 2023
1 parent b35d286 commit 4a8fb19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ee/tabby-webserver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.clone()));

let ui = ui
.route("/graphql", routing::get(playground("/graphql", None)))
.route("/graphiql", routing::get(graphiql("/graphql", None)))
.fallback(ui::handler);

Expand Down

0 comments on commit 4a8fb19

Please sign in to comment.