subhxsh
subhxsh
KKysely
Created by subhxsh on 7/30/2024 in #help
.filterWhere inference
I have this in a select
.coalesce(
fn
.jsonAgg(
jsonBuildObject({
id: ref("i.id"),
label: ref("i.label")
})
)
.filterWhere("i.id", "is not", null),
sql`[]`
)
.as("interests")
.coalesce(
fn
.jsonAgg(
jsonBuildObject({
id: ref("i.id"),
label: ref("i.label")
})
)
.filterWhere("i.id", "is not", null),
sql`[]`
)
.as("interests")
The result is being inferred as { id: string | null; label: string | null }[] Shouldn't it be { id: string; label: string }[] ?
10 replies