@@ -209,6 +209,7 @@ instance HasClient t m sublayout
209 clientWithRoute Proxy q =
209 clientWithRoute Proxy q =
210 clientWithRoute (Proxy :: Proxy sublayout) q
210 clientWithRoute (Proxy :: Proxy sublayout) q
212-- | If you use a 'QueryParam' in one of your endpoints in your API,
213-- | If you use a 'QueryParam' in one of your endpoints in your API,
213-- the corresponding querying function will automatically take
214-- the corresponding querying function will automatically take
214-- an additional argument of the type specified by your 'QueryParam',
215-- an additional argument of the type specified by your 'QueryParam',
@@ -240,7 +241,7 @@ instance (KnownSymbol sym, ToHttpApiData a, HasClient t m sublayout, Reflex t)
241 type Client t m (QueryParam sym a :> sublayout) =
242 type Client t m (QueryParam sym a :> sublayout) =
242 -- TODO (Maybe a), or (Maybe (Maybe a))? (should the user be able to send a Nothing)
243 -- TODO (Maybe a), or (Maybe (Maybe a))? (should the user be able to send a Nothing)
243− Behavior t (Either String a) -> Client t m sublayout
244+ Behavior t (QParam a) -> Client t m sublayout
245 -- if mparam = Nothing, we don't add it to the query string
246 -- if mparam = Nothing, we don't add it to the query string
246 clientWithRoute Proxy q req baseurl mparam =
247 clientWithRoute Proxy q req baseurl mparam =
@@ -248,7 +249,7 @@ instance (KnownSymbol sym, ToHttpApiData a, HasClient t m sublayout, Reflex t)
248 (req {qParams = paramPair : qParams req}) baseurl
249 (req {qParams = paramPair : qParams req}) baseurl
250 where pname = symbolVal (Proxy :: Proxy sym)
251 where pname = symbolVal (Proxy :: Proxy sym)
251− p prm = QueryPartParam $ (fmap . fmap) (unpack . toQueryParam) prm
252+ p prm = QueryPartParam $ fmap (qParamToQueryPart) prm -- (fmap . fmap) (unpack . toQueryParam) prm
252 paramPair = (pname, p mparam)
253 paramPair = (pname, p mparam)
254-- | If you use a 'QueryParams' in one of your endpoints in your API,
255-- | If you use a 'QueryParams' in one of your endpoints in your API,