Is there any way to convert an array of Refs to a Set?
If a client sends an array of ids or Refs for an operation, it could be useful to use
Intersection and/or other Set operations for that array with Sets in the DB.
This can kinda be done now, but it requires reading the Set and mapping to an array. If the user provided array is much smaller than the Set, then paginating the whole Set would be very wasteful.
I suppose you could use an Index by Ref and then Union those. This might actually be okay for really small user input, but sounds like it could rack up read ops quickly for each Index and Union op.
Union( Map([list, of, refs], ref => Match(Index('index_by_ref'), Var('ref'))) )
See also this question from @danbars , which made me think of this: