packages feed

morpheus-graphql 0.7.0 → 0.7.1

raw patch · 3 files changed

+30/−7 lines, 3 filesdep ~megaparsecPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: megaparsec

API changes (from Hackage documentation)

Files

README.md view
@@ -29,7 +29,7 @@ resolver: lts-14.8  extra-deps:-  - morpheus-graphql-0.7.0+  - morpheus-graphql-0.7.1 ```  As Morpheus is quite new, make sure stack can find morpheus-graphql by running `stack upgrade` and `stack update`@@ -241,7 +241,7 @@   deriving (Generic)  instance GQLType Character where-  type KIND City = UNION+  type KIND Character = UNION ```  ### Scalar types@@ -441,7 +441,26 @@         jsonRes = <GraphQL APi> ``` -types can be generatet from `introspection` too:+in this case, `jsonRes` is resolves a request into a response in some monad `m`.++A `fetch` resolver implementation against [a real API](https://swapi.graph.cool) may look like the following:++```haskell+{-# LANGUAGE OverloadedStrings #-}++import Data.ByteString.Lazy (ByteString)+import qualified Data.ByteString.Char8 as C8+import Network.HTTP.Req++resolver :: String -> ByteString -> IO ByteString+resolver tok b = runReq defaultHttpConfig $ do+    let headers = header "Content-Type" "application/json"+    responseBody <$> req POST (https "swapi.graph.cool") (ReqBodyLbs b) lbsResponse headers+```++this is demonstrated in examples/src/Client/StarWarsClient.hs++types can be generated from `introspection` too:  ```haskell defineByIntrospectionFile "./introspection.json"
changelog.md view
@@ -1,3 +1,7 @@+## [0.7.1] - 26.11.2019++- max bound icludes: support-megaparsec-8.0+ ## [0.7.0] - 24.11.2019  ## Removed
morpheus-graphql.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: a97de9ffea5713a01a84ffef6bd7ee41104d3d898f2d6a90ae0ef0be27ba7568+-- hash: efbb028b66786193717210bd506961ab228d3150ecf66b7d6645e5f972aa3c95  name:           morpheus-graphql-version:        0.7.0+version:        0.7.1 synopsis:       Morpheus GraphQL description:    Build GraphQL APIs with your favourite functional language! category:       web, graphql@@ -340,7 +340,7 @@     , base >=4.7 && <5     , bytestring >=0.10.4 && <0.11     , containers >=0.4.2.1 && <0.7-    , megaparsec >=7.0.0 && <8.0+    , megaparsec >=7.0.0 && <9.0.0     , mtl >=2.0 && <=2.3     , scientific >=0.3.6.2 && <0.4     , template-haskell >=2.0 && <=2.16@@ -377,7 +377,7 @@     , base >=4.7 && <5     , bytestring >=0.10.4 && <0.11     , containers >=0.4.2.1 && <0.7-    , megaparsec >=7.0.0 && <8.0+    , megaparsec >=7.0.0 && <9.0.0     , morpheus-graphql     , mtl >=2.0 && <=2.3     , scientific >=0.3.6.2 && <0.4