fix: cors
parent
298ed2097a
commit
5782ab8a77
|
|
@ -3,7 +3,7 @@ import { GraphQLClient, Variables, RequestOptions } from 'graphql-request'
|
|||
export const graphQLClient = new GraphQLClient(
|
||||
`${process.env.NEXT_PUBLIC_TABBY_SERVER_URL ?? ''}/graphql`,
|
||||
{
|
||||
credentials: 'include',
|
||||
// credentials: 'include',
|
||||
mode: 'cors'
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue