Replies: 2 comments
-
Thanks @mschnee. I will put a PR together for this to guide the discussion further |
Beta Was this translation helpful? Give feedback.
0 replies
-
As promised: We have 3 options: const schema = await buildSchema({
resolvers: [ExampleResolver],
// automatically create `schema.gql` file with schema definition in project's working directory
emitSchemaFile: true,
// or create the file with schema in selected path
emitSchemaFile: path.resolve(__dirname, "__snapshots__/schema/schema.gql"),
// or pass a config object
emitSchemaFile: {
path: __dirname + "/schema.gql",
commentDescriptions: true,
sortedSchema: false, // by default the printed schema is sorted alphabetically
},
}); I opted for: emitSchemaFile: {
path: __dirname + "/schema.gql",
commentDescriptions: true,
sortedSchema: false, // by default the printed schema is sorted alphabetically
}, As it gives users more control |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Following up on our discussion in #7938, we should update the GraphQL Server/Component configuration to support TypeGraphQL's
emitSChemaFile
configuration option.Beta Was this translation helpful? Give feedback.
All reactions