Allow `iterateEntities` to find entities by properties other than just `_type`
This would allow folks to avoid writing their own iterators that just filter the matching entities. We can do this in the SDK as-is, inefficient as it may be, but at least when we make it fast, there will be no changes in the integrations.
I had to use this for a project once, I think you can make it only do in memory and not persist to a file. Also think it supports defining an index so we could have integration developers provide hints about what properties they'll be filtering by.
It worked well enough.
Thanks for pointing this out @austin-rausch.
we could have integration developers provide hints about what properties they'll be filtering by
That's great.
Looking at the GitLab integration and seeing a lot of cases of building in-memory maps of id => entity.
Recently we implemented getEntity({ _key: string, _type: string }), might be relevant here.