New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript complaining about inferred types when splitting queries #58
Comments
As we've been using groqd more and more this shows up basically when the queries/types become very large. I'm pretty sure this probably isn't something groqd can fix directly, but doing: const pageQuery = /* huge page query with a page builder or something */
type PageType = inferType<typeof pageQuery> Would be pretty awesome. |
For us even the most simple groqd query results in this issue, which makes the library unusable, since we cannot inline all the queries. Disabling declaration emit is also no option, since we are using composite projects. |
We're seeing this issue too. The problem only occurs when we try to We have a monorepo and disabling I see similar issues on the underlying Zod GH project - one person suggested a hacky yarn patch to increase the TS serialization length limit. |
Hi!
I get some weird errors when splitting queries into multiple files:
This returns the error:
The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed
Of course explicitly typing the query kinda ruins the point heh.
Adding this to mu
tsconfig.json
file removes the error:The text was updated successfully, but these errors were encountered: