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