Introduction
Last updated
Was this helpful?
Last updated
Was this helpful?
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 to add relationship metadata and later 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.
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: