lrstanley / entrest

Extension that generates a compliant OpenAPI spec and server implementation
https://lrstanley.github.io/entrest/
MIT License
11 stars 2 forks source link

support configuring default sorting/order (incl. eager-loaded edges) #47

Closed lrstanley closed 3 months ago

lrstanley commented 3 months ago

Example:

func (Pet) Annotations() []schema.Annotation {
    return []schema.Annotation{
        entrest.WithDefaultSort("name"),
        entrest.WithDefaultOrder(entrest.OrderAsc),
    }
}

Also allowing eager-loaded edges, which aren't currently filterable (or allow special sorting) to be sorted in a standardized way.