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: `mutation { GeneratePAT(arg1: { duration: "30d" }) { personalAccessToken } }` }) }); const data = await res.json(); console.log(JSON.stringify(data, null, 2)); } main().catch(console.error);