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: `mutation AppLogs($appId: String!, $max: Int!) { appLogs(arg1: { appId: $appId, max: $max }) { timestamp message source severity } }`, variables: { appId: '8fb7c350-8475-4512-805d-f14fb42ef422', max: 50 } }) }); console.log('AppLogs result:\n', JSON.stringify(await res.json(), null, 2)); } main().catch(console.error);