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 { __type(name: "mutation_root") { fields { name args { name type { name kind ofType { name kind inputFields { name type { name kind ofType { name } } } } } } } } }` }) }); const data = await res.json(); const fields = data.data?.__type?.fields?.filter(f => f.name === 'createApp' || f.name === 'updateApp') || []; console.log(JSON.stringify(fields, null, 2)); } main().catch(console.error);