When performing multiple branched inserts, usually as a result of a custom mutation inserting an array of models, selections from each insert are often required. To support this a union of results from each branched insert is needed.
A new query operation, reduce, could be used to perform the union across all branches. Initially it would just concatenate results, but it could potentially be used to perform a function on each result. It would probably look something like:
When performing multiple branched inserts, usually as a result of a custom mutation inserting an array of models, selections from each insert are often required. To support this a union of results from each branched insert is needed.
A new query operation,
reduce
, could be used to perform the union across all branches. Initially it would just concatenate results, but it could potentially be used to perform a function on each result. It would probably look something like: