async function QueryAPI(query) {
const response = await fetch(
`https://api.opencollective.com/graphql/v2`,
{
headers: {
accept: "application/json, text/javascript, */*",
"content-type": "application/json"
},
body: JSON.stringify({ query }),
method: "POST",
mode: "cors",
redirect: "follow"
}
);
if (!response.ok) throw new Error(response.status);
const data = await response.json();
return data.data;
}