21 lines
570 B
JavaScript
21 lines
570 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 {
|
|
__type(name: "ghaymah_cloud_row_event") {
|
|
fields { name }
|
|
}
|
|
}`
|
|
})
|
|
});
|
|
const data = await res.json();
|
|
console.log(data.data?.__type?.fields?.map(f => f.name));
|
|
}
|
|
|
|
main().catch(console.error);
|