Introduction
Motivation
While the first goal of AutoRelay always has been to adhere to the Relay spec, pretty quickly it became clear that more powerful features could be needed in day to day operation. The first of those were to Extend edges to add relationship metadata and later Extending PageInfo / Connection to be able to implement custom desired logic such as totalCount
.
In the same vein as those, we quickly came upon the need to implement and standardise a way to sort fields, whether be it in a Relayed
query or not.
As to not bloat the main auto-relay
package, all sorting features have been ported in @auto-relay/sorting
and can be used besides or without the main pagination features.
Quick look
Currently, the sorting package allows automatically generating all the necessary types for sorting, as well as providing simple API to convert those to input expected by ORMs.
will generate the following working SDL:
Last updated
Was this helpful?