Skip to content

If I can't use headers with env variables in tsconfig.json, do I need to run the generate CLI command first? #366

Answered by kitten
erosenberg asked this question in Q&A
Discussion options

You must be logged in to vote

In general, you'll need an SDL (i.e. schema) file, yes. If your schema is on a remote API, that does mean that you have to run gql.tada generate schema, if additional inputs are required for the API to deliver an introspection result successfully.

The output typings files are an entirely separate topic. Once you switch over your "schema" configuration option in your settings to then use the local file, you won't have to necessarily generate this file manually. You can generate this manually, which is useful when you have separate processes that rely on it
(Say, you don't commit it and are running tsc in your CI, or you commit it but want to check that it's up-to-date)

What I'd point out i…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@erosenberg
Comment options

@kitten
Comment options

Answer selected by erosenberg
@erosenberg
Comment options

@erosenberg
Comment options

@kitten
Comment options

@erosenberg
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants