fix(webserver): make GET /graphql route an api route (so it's valid through cors) (#858)
parent
2b785e8b80
commit
bb534fae27
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue