-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The current implementation of the sort is strict: if a query result in a list of two kind of objects, any sort on that list must be on the exact same attributes and orders.
It's possible to relax this restriction by saying:
A is declared as A { a, b, c }
B is declared as B { a, d, c }
A: { '.': ['+a', '+b'] },
B: { '.': ['+a'] },
is valid, and mean order by "a asc" then by "b asc" if b exists otherwise consider b value as being an empty string or zero depending of the type.
A: { '.': ['+a', '+b', '+c'] },
B: { '.': ['+a', '+c'] },
is valid and mean order by a, then b if any, then c.
The rules for an attribute to differ would be:
- it can't be the first attribute (to prevent common mistakes)
- it can't exists on the other type (to prevent common mistakes)