Files

21 lines
558 B
JavaScript

const { getAuth } = require('./auth_manager');
async function main() {
const { token } = await getAuth();
const res = await fetch('https://graphql.ghaymah.systems/v1/graphql', {
method: 'POST',
headers: { 'Authorization': 'Bearer ' + token, 'Content-Type': 'application/json' },
body: JSON.stringify({
query: `query {
ghaymah_cloud_resources {
id status values
}
}`
})
});
const data = await res.json();
console.log('Response:', JSON.stringify(data, null, 2));
}
main().catch(console.error);