-
Notifications
You must be signed in to change notification settings - Fork 435
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
TypeGen generates Array<never> for query using "in" #6628
Comments
For what it's worth, this is a simplified case. My actual query is more like
|
This should now be fixed in the latest release https://github.com/sanity-io/sanity/releases/tag/v3.56.0 |
Closing for now, feel free to reopen if this is still an issue |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
If you find a security vulnerability, do NOT open an issue. Email security@sanity.io instead.
Describe the bug
When a GROQ query uses the
in
operator in a filter component, the TypeGen-generated type of the query result ends up asArray
.To Reproduce
src/queries.ts
file with these contents:npx sanity schema extract && npx sanity typegen generate && cat sanity.types.ts
, and observe theQueryWithInResult
typeExpected behavior
(which is the result generated if you use a filter that involves
==
instead ofin
)Actual behavior
Which versions of Sanity are you using?
What operating system are you using?
GNU/Linux (Ubuntu 22.04.4 LTS)
Which versions of Node.js / npm are you running?
npm -v && node -v
:10.2.4
v20.11.1
The text was updated successfully, but these errors were encountered: