case lookup hContentType $ requestHeaders req of
Just "application/json" ->
case A.eitherDecode body of
Left err -> toError $ T.pack err
Right (GraphQLInput qry vars opName) -> execQuery opName vars qry
Just "application/graphql" ->
case decodeUtf8' $ toStrict body of
Left err -> toError $ "Could not decode utf8 from body: " <> unpackUnicodeException err
Right msg -> execQuery Nothing HM.empty msg
_ -> toError "No `Content-Type` header found!"
_ -> toError "Unsupported method"`
Missing charset parameter case causes {"content-type": "application/json; charset=utf-8"} to fail - ("message":"No Content-Type header found!").
https://github.com/higherkindness/mu-haskell/blob/master/graphql/src/Mu/GraphQL/Server.hs
Missing charset parameter case causes {"content-type": "application/json; charset=utf-8"} to fail - ("message":"No
Content-Type
header found!").