function graphql(payload, headers = {}) {
headers["content-type"] = "application/json";
return fetch(url, {
body: JSON.stringify(payload),
headers: headers,
method: "POST",
mode: "cors"
})
.then(response => {
return response.json();
})
.then(jsonData => {
return jsonData.data;
});
}