4 Replies
try this
wouldn't it be faster to filter by id first?
But also when I try what you wrote, I get a typescript error at facilities = facilities
It is also telling me that .withSearchIndex is not a function - but my schema has it
Oh i guess I can't do a withSearchIndex after a filter... strange
typescript might not be happy with this since the types differ. personally i would split the cases more
Ok thank you - strange though, would be nice if we can keep the same var throughout...
i ended up doing this and it worked ok - typescript only had an issue re-assigning it to the same var if it was .withSearchIndex but re-assigning with adding just .filter seemed to work just fine