Nested field indexes and query filters
Hello! I am trying to run this query:
But I'm not able to create an index for
properties.gridLayout.i
I'm surprised this query also doesn't return any results
the schema of blocks is a union and not all objects inside the union have a guaranteed gridLayout property. Just wondering if this is expected so that I know if I'm doing something wrong3 Replies
what prevents you from creating the index on "properties.gridLayout.i"? I think it should be supported, although typescript might not like it so you may need to cast to
any
or refactor the schema so the field always existsSorry I should have been clearer. It's possible to create the index but querying it isn't

oh gotcha. Yeah this is a typescript problem. You could do
.eq("properties.gridLayout.i", i as any as undefined)
to work around it. Thanks for reporting