query = function(q, token, url) {
const opts = {
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': `token ${token}`,
},
method: 'post',
body: JSON.stringify({query: q})
};
return fetch(url, opts).then(r=>r.json())
}