graphql-code-generator
graphql-code-generator copied to clipboard
Print missing dependency warnings for filetypes even if supported files match
Is your feature request related to a problem? Please describe.
I just spent 1.5 days debugging why building graphql types suddenly failed for seemingly no reason after doing some maintenance and upgrading a few packages. Eventually, I noticed that all errors seemed related to fragments that were defined in .svelte
files. Just to test, I temporarily changed the documents
glob to only match .svelte
files, and it finally printed this error: GraphQL template literals cannot be plucked from a Svelte template code without having the "svelte2tsx" & "svelte" package installed.
I installed svelte2tsx, which seemingly was previously a sub-dependency of some other package we were depending on, and the types finally built.
Describe the solution you'd like
It seems like this error is suppressed if the glob matches at least one supported file, but at least in my case it'd have saved me so much time if it would've errored despite successfully parsing a few .ts
files. Would be great if these dependency checks were done upfront for all file types matched by the document glob.
Describe alternatives you've considered
No response
Is your feature request related to a problem? Please describe.
No response