HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleservant-0.20.2Haskell2010

Servant.API.QueryString

  • 2 types
  • 2 classes
  • 1 value
  • Packageservant-0.20.2
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceQueryString.hs
datadata QueryString
#

Extract the whole query string from a request. This is useful for query strings containing dynamic parameter names. For query strings with static parameter names, QueryParam is more suited.

Example:

Example2 expressions
-- /books?author=<author name>&year=<book year>type MyApi = "books" :> QueryString :> Get '[JSON] [Book]
datadata DeepQuery (sym :: Symbol) a
#

Extract an deep object from a query string.

Example:

Example2 expressions
-- /books?filter[author][name]=<author name>&filter[year]=<book year>type MyApi = "books" :> DeepQuery "filter" BookQuery :> Get '[JSON] [Book]
classclass FromDeepQuery a where
#

Extract a deep object from (possibly nested) query parameters. a param like filter[a][b][c]=d will be represented as '(["a", "b", "c"], Just "d")'. Note that a parameter with no nested field is possible: filter=a will be represented as '([], Just "a")'

Methods

Instances1FromDeepQuery
classclass ToDeepQuery a where
#

Generate query parameters from an object, using the deep object syntax. A result of '(["a", "b", "c"], Just "d")' attributed to the filter parameter name will result in the following query parameter: filter[a][b][c]=d

Methods