Configuration
Emitting Schema
It is possible to automatically emit the generated GraphQL schema using the emitSchemaFile
configuration option. This might be useful for generating client without relying on schema introspection or for working in "schema-first".
By default it will generate a schema.gql
file at the root of your application but you might want to define a specific path.
You can read more about schema emitting on the TypeGraphQL documentation.
Introspection and Playground
It’s often useful to ask a GraphQL schema for information about what queries it supports. GraphQL allows you to do so using the introspection system.
It is highly recommended to not enable introspection in production for security reasons as it exposes the available operation of your Application.
You can use the apollo.introspection
and apollo.playground
options in your GraphQL configuration file:
Apollo Server options
The apollo
option of your GraphQL configuration is merged with the options provided by @foadonis/graphql
allowing you to extend the capabilies of the ApolloServer. You can for example add plugins.
Schema Generation Options
Your GraphQL configuration is merged with the options used to generate the GraphQL schema allowing you to extend the capabilies of your schema. For example you might want to add Custom scalars.
You can find more information about the available options on the Official TypeGraphQL documentation