servant-util-0.1.0.2: Servant servers utilities.
Safe HaskellNone
LanguageHaskell2010

Servant.Util.Combinators.Sorting.Server

Orphan instances

ReifyParamsNames allowed => FromHttpApiData (TaggedSortingItemsList allowed) Source #

Parse sort_by query param. Following the format described in Sorting section of https://www.moesif.com/blog/technical/api-design/REST-API-Design-Filtering-Sorting-and-Pagination/

Instance details

(HasServer subApi ctx, HasContextEntry (ctx .++ DefaultErrorFormatters) ErrorFormatters, ReifySortingItems base, ReifyParamsNames provided) => HasServer (SortingParams provided base :> subApi :: Type) ctx Source #

Consumes "sortBy" query parameter and fetches sorting parameters contained in it.

Instance details

Associated Types

type ServerT (SortingParams provided base :> subApi) m #

Methods

route :: Proxy (SortingParams provided base :> subApi) -> Context ctx -> Delayed env (Server (SortingParams provided base :> subApi)) -> Router env #

hoistServerWithContext :: Proxy (SortingParams provided base :> subApi) -> Proxy ctx -> (forall x. m x -> n x) -> ServerT (SortingParams provided base :> subApi) m -> ServerT (SortingParams provided base :> subApi) n #