Skip to content

Sort between different object types with same path #7

@Speedy37

Description

@Speedy37

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions