Closed cetchebarne closed 2 months ago
Closing as I just noticed this specific function is not yet supported as stated here. According to the docs, it should at least define the type as unknown instead of throwing error though.
Is there any plans to implement the geo namespace?
Describe the bug
When running Typegen, I get an error when generating types for a query that uses the geo namespace. I was using Sanity 3.40 and updated to 3.53 but I'm still getting the same error. The query works fine when running it in Vision.
To Reproduce
Steps to reproduce the behavior:
1 - Use a query with geopoint:
export const contactInfoQuery = groq
*[_type == "contactInformation"] | order(geo::distance(location, $input)) [0] {...};
2 - This is an example schema:
Expected behavior
Types should be correctly generated without error.
Screenshots
Which versions of Sanity are you using?
Run
sanity versions
in the terminal and copy-paste the result here.@sanity/cli (global) 3.53.0 (up to date) @sanity/document-internationalization 3.0.0 (up to date) @sanity/google-maps-input 4.0.1 (up to date) @sanity/preview-url-secret 1.6.18 (latest: 1.6.19) @sanity/vision 3.40.0 (latest: 3.53.0) sanity 3.53.0 (up to date)
What operating system are you using?
MacOS Sonoma 14.5
Which versions of Node.js / npm are you running?
Node: v18.20.3 Npm: 10.7.0 Yarn: 1.22.22
Additional context
N/A