generateGraphQLSchema() — supabase Function Reference
Architecture documentation for the generateGraphQLSchema() function in graphqlSchema.ts from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/docs/scripts/graphqlSchema.ts lines 9–26
async function generateGraphQLSchema() {
try {
const schemaString = printSchema(rootGraphQLSchema)
const outputDir = path.resolve(__dirname, '../__generated__')
if (!fs.existsSync(outputDir)) {
fs.mkdirSync(outputDir, { recursive: true })
}
const outputPath = path.resolve(outputDir, 'schema.graphql')
fs.writeFileSync(outputPath, schemaString)
console.log(`✅ Successfully generated GraphQL schema at ${outputPath}`)
} catch (error) {
console.error('🚨 Error generating GraphQL schema:', error)
process.exit(1)
}
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free