Closed danteissaias closed 1 month ago
groq-builder converts potentially undefined fields to potentially null in top level projections. However it doesn't change any types deeper into the query.
groq-builder
// Schema type type Product = { _id: string; _type: "product"; name?: string; }; // Query export const productsQuery = q.star .filter(...) .project((q) => ({ products: q.field("products[]").deref(), })); type ResultType = { products: Product[] | null; }
Is this inconsistency between null and undefined intentional?
Is there an existing issue for this?
Code of Conduct
Question
groq-builder
converts potentially undefined fields to potentially null in top level projections. However it doesn't change any types deeper into the query.Is this inconsistency between null and undefined intentional?