Files

20 lines
672 B
JavaScript

const fs = require('fs');
const tokenData = JSON.parse(fs.readFileSync('D:/cumin/ghaymah_dns_net_sec_tests/token.json', 'utf8'));
async function main() {
const res = await fetch('https://graphql.ghaymah.systems/v1/graphql', {
method: 'POST',
headers: { 'Authorization': 'Bearer ' + tokenData.token, 'Content-Type': 'application/json' },
body: JSON.stringify({
query: `query {
ghaymah_cloud_resources(where: { id: { _eq: "438afe70-6ff8-4892-b5b0-e6d3d4800c4e" } }) {
id values message status
}
}`
})
});
const data = await res.json();
console.log(JSON.stringify(data, null, 2));
}
main().catch(console.error);