You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks @alpmestan for raising this issue up.
My intent is to get a graphql-like API, so that my client functions could get the dynamic type behaviours based on request body only.
Current issue is that, Servant always failed at first parse and never try next alternatives.
Why do i want this behaviour ?
Because it's nonsense to prepend stringly routes (naming is HARD) just to make this kind of API more dynamic.
(Yes, I'm aggressively closing stale questions issues; maybe you should try your luck on stack overflow?)
And FWIW, servant unfortunately cannot route based on ReqBody contents (it can on its content-type IIRC). This because ReqBody is very general, and may include large bodies (ideally we'll unify ReqBody and StreamBody and let the data type decide).
What you can do, is to write own ReqBody-like combinator.
https://github.com/revskill10/circle-haskell/blob/html/core/Lib.hs
(the route for GraphQL is at Handlers/Json/GraphQL.hs)
(by
revskill
on #haskell)The text was updated successfully, but these errors were encountered: