use demo server

This commit is contained in:
Brandon Fergerson 2022-04-19 12:06:05 +02:00
parent be60d5c770
commit f225ef8bd1
3 changed files with 15 additions and 3 deletions

View File

@ -24,7 +24,12 @@ async function query(param: {
const res: AxiosResponse = await axios.post(
"/graphql",
{ query: param.queryStr, variables: { ...param.conditions } },
{ cancelToken: cancelToken() }
{
cancelToken: cancelToken(),
headers: {
Authorization: "Basic c2t5d2Fsa2luZzpza3l3YWxraW5n",
},
}
);
if (res.data.errors) {
res.data.errors = res.data.errors

View File

@ -51,7 +51,12 @@ class Graphql {
query: query[this.queryData],
variables: variablesData,
},
{ cancelToken: cancelToken() }
{
cancelToken: cancelToken(),
headers: {
Authorization: "Basic c2t5d2Fsa2luZzpza3l3YWxraW5n",
},
}
)
.then((res: AxiosResponse) => {
if (res.data.errors) {

View File

@ -25,7 +25,9 @@ module.exports = {
devServer: {
proxy: {
"/graphql": {
target: `${process.env.SW_PROXY_TARGET || "http://127.0.0.1:12800"}`,
target: `${
process.env.SW_PROXY_TARGET || "http://demo.skywalking.apache.org"
}`,
changeOrigin: true,
},
},