I have a nextjs & typescript & apollo-client
app that communicates with a GraphQL
API and it uses code-gen
to generate types using the introspection in development environment. It works well in dev so no questions here.
In production we have introspection disabled due to some security matters and code-gen
cannot be used here.
The current approach is committing the code-gen
outputs to the repository. And the wanted approach is to generate types when the docker creates the container by running the command.
How do I generate the types in production when the introspection is disabled?