Servant.Util.Combinators.Sorting.Server
Contents
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/
sort_by
Methods
parseUrlPiece :: Text -> Either Text (TaggedSortingItemsList allowed) #
parseHeader :: ByteString -> Either Text (TaggedSortingItemsList allowed) #
parseQueryParam :: Text -> Either Text (TaggedSortingItemsList allowed) #
Consumes "sortBy" query parameter and fetches sorting parameters contained in it.
Associated Types
type ServerT (SortingParams provided base :> subApi) m #
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 #