Files
ghaymah-dns-net-sec-tests/scripts/query_gateway_resource.js
T

24 lines
629 B
JavaScript

const { getAuth } = require('./auth_manager');
async function main() {
const td = await getAuth();
const res = await fetch('https://graphql.ghaymah.systems/v1/graphql', {
method: 'POST',
headers: { 'Authorization': 'Bearer ' + td.token, 'Content-Type': 'application/json' },
body: JSON.stringify({
query: `query {
ghaymah_cloud_resources_by_pk(id: "3d5666fe-95db-4e73-b6b2-dd0e41fca7f6") {
id
chart_name
status
message
values
}
}`
})
});
console.log(JSON.stringify(await res.json(), null, 2));
}
main().catch(console.error);