Public
Edited
Mar 30, 2023
Importers
Insert cell
Insert cell
Insert cell
Insert cell
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;
}
Insert cell
function OpenCollective(token) {
return {
query: (query) => QueryAPI(query, { token })
};
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more