Added Directus System Endpoint and displaying files

This commit is contained in:
Samuel Andert
2023-09-13 13:49:56 +02:00
parent b1185b44dd
commit 91b351ef2e
14 changed files with 2898 additions and 16 deletions

File diff suppressed because it is too large Load Diff

View File

@ -22,8 +22,16 @@ export async function fetchSchemas() {
}
});
// Fetch the GraphQL SDL schema
const { data: systemSchema } = await axios.get(`${serverUrl}/server/specs/graphql/system`, {
headers: {
'Authorization': process.env.DIRECTUS
}
});
// Save the schema to a file
fs.writeFileSync('./.wundergraph/schemas/directus.graphql', schema);
fs.writeFileSync('./.wundergraph/schemas/directus_system.graphql', systemSchema);
}
fetchSchemas().catch(console.error);