🐛 Bug fixes with env
This commit is contained in:
parent
e98ff89de9
commit
235c556f3d
@ -1,15 +1,12 @@
|
|||||||
export async function graphQuery(query: string, variables: any) {
|
export async function graphQuery(query: string, variables: any) {
|
||||||
const response = await fetch(
|
const response = await fetch(`${process.env.PUBLIC_CMS}/api/graphql`, {
|
||||||
`${import.meta.env.PUBLIC_CMS}/api/graphql`,
|
method: "POST",
|
||||||
{
|
headers: { "Content-Type": "application/json" },
|
||||||
method: "POST",
|
body: JSON.stringify({
|
||||||
headers: { "Content-Type": "application/json" },
|
query,
|
||||||
body: JSON.stringify({
|
variables,
|
||||||
query,
|
}),
|
||||||
variables,
|
});
|
||||||
}),
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return await response.json();
|
return await response.json();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user