Embded frontend inside go binary
This will simplify the self hosting of the platform. Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
@@ -11,7 +11,7 @@ const fetchRelay: FetchFunction = async (
|
||||
request,
|
||||
variables,
|
||||
_,
|
||||
uploadables,
|
||||
uploadables
|
||||
) => {
|
||||
const requestInit: RequestInit = {
|
||||
method: "POST",
|
||||
@@ -27,7 +27,7 @@ const fetchRelay: FetchFunction = async (
|
||||
operationName: request.name,
|
||||
query: request.text,
|
||||
variables: variables,
|
||||
}),
|
||||
})
|
||||
);
|
||||
|
||||
const uploadableMap: {
|
||||
@@ -59,7 +59,10 @@ const fetchRelay: FetchFunction = async (
|
||||
});
|
||||
}
|
||||
|
||||
const response = await fetch(buildEndpoint("/console/v1/query"), requestInit);
|
||||
const response = await fetch(
|
||||
buildEndpoint("/api/console/v1/query"),
|
||||
requestInit
|
||||
);
|
||||
|
||||
const json = await response.json();
|
||||
|
||||
@@ -68,8 +71,8 @@ const fetchRelay: FetchFunction = async (
|
||||
`Error fetching GraphQL query '${
|
||||
request.name
|
||||
}' with variables '${JSON.stringify(variables)}': ${JSON.stringify(
|
||||
json.errors,
|
||||
)}`,
|
||||
json.errors
|
||||
)}`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user