webui: Add dev-proxy

This commit is contained in:
Kevin Kandlbinder 2022-09-07 14:34:09 +02:00
parent 3a8bf1aef4
commit 1f5b9175fd
2 changed files with 3 additions and 2 deletions

View file

@ -63,5 +63,6 @@
"babel-plugin-relay": "^14.1.0",
"graphql": "^16.3.0",
"relay-compiler": "^13.2.0"
}
},
"proxy": "http://localhost:8123"
}

View file

@ -13,7 +13,7 @@ async function fetchGraphQL(auth: GQLAuthObj, text: any, variables: any) {
headers["Authorization"] = `Bearer ${auth.auth}`
}
const response = await fetch('http://127.0.0.1:8123/api/query', {
const response = await fetch('/api/query', {
method: 'POST',
headers: headers,
body: JSON.stringify({