orbitjs / orbit

Composable data framework for ambitious web applications.
https://orbitjs.com
MIT License
2.33k stars 134 forks source link

Allow for explicit "singular" requests (queries / transforms) #855

Closed dgeb closed 3 years ago

dgeb commented 3 years ago

Query#expressions now accepts either a single expression or an array of expressions.

Likewise, Transform#operations now accepts either a single operation or an array of operations.

This allows more explicit control over the form in which results will be returned. Data will always be returned in an array when an array is used to express expressions / operations.

This represents a breaking change. Previously, an array of expressions or operations with a single member was processed to produce a singular result. Now, the resulting data will be returned in an array.