const fetchGraphQL = async ({ url, query, variables, headers }) => { const response = await fetch(url, { method: "POST", headers: { ...headers, "Content-Type": "application/json" }, body: JSON.stringify({ query, variables }) }); // Get the response as JSON return response.json(); };