From 52252248af96f187ff8053ce4b870277ecc3e678 Mon Sep 17 00:00:00 2001 From: nalchevanidze Date: Fri, 22 May 2020 00:07:36 +0200 Subject: [PATCH] Release 0.12.0 (#455) * changelog date * update template haskell bounds * for cabal too * update index.md * lts-15.13 * stack yaml --- .circleci/config.yml | 42 ++++++++++++++++++- changelog.md | 2 +- docs/index.md | 30 ++++++++++++- morpheus-graphql-client/changelog.md | 2 +- .../morpheus-graphql-client.cabal | 8 ++-- morpheus-graphql-client/package.yaml | 6 +-- morpheus-graphql-core/changelog.md | 2 +- .../morpheus-graphql-core.cabal | 10 ++--- morpheus-graphql-core/package.yaml | 4 +- morpheus-graphql.cabal | 18 ++++---- package.yaml | 8 ++-- stack-14.14.yaml | 7 ++++ stack.yaml | 4 +- 13 files changed, 108 insertions(+), 35 deletions(-) create mode 100644 stack-14.14.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml index 73433e329f..3c39f406c3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -79,6 +79,44 @@ jobs: ghc_8_6_5: docker: - image: fpco/stack-build:lts-14.14 + steps: + - checkout + - restore_cache: + name: restore cached stack + keys: + - stack-vesrion-{{ checksum "stack-14.14.yaml" }} + - restore_cache: + name: restore cached dependencies + keys: + - stack-dependencies-{{ checksum "stack-14.14.yaml" }}-{{ checksum "package.yaml" }}-{{ checksum "examples/package.yaml" }} + - run: + name: setup stack + command: stack --no-terminal setup + - save_cache: + name: cache stack + key: stack-vesrion-{{ checksum "stack-14.14.yaml" }} + paths: + - /root/.stack + - run: + name: install dependencies + command: stack build --skip-ghc-check --no-terminal --test --only-dependencies + - save_cache: + name: cache dependencies + key: stack-dependencies-{{ checksum "stack-14.14.yaml" }}-{{ checksum "package.yaml" }}-{{ checksum "examples/package.yaml" }} + paths: + - ".stack-work" + - "/root/.stack" + - run: + name: Run tests + command: stack test --haddock --no-haddock-deps + - run: + name: Install executables + command: stack install + + ## GHC 8.8.3 + ghc_8_8_3: + docker: + - image: fpco/stack-build:lts-15.13 steps: - checkout - restore_cache: @@ -112,7 +150,7 @@ jobs: - run: name: Install executables command: stack install - + ## GHC Nightly ghc_nightly: docker: @@ -158,4 +196,4 @@ workflows: - ghc_8_2_2 - ghc_8_4_4 - ghc_8_6_5 - - ghc_nightly \ No newline at end of file + - ghc_nightly diff --git a/changelog.md b/changelog.md index ceb5a30708..2b5fe70bbf 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,6 @@ # Changelog -## 0.12.0 Unreleased Changes +## 0.12.0 - 21.05.2020 ### Breaking Changes diff --git a/docs/index.md b/docs/index.md index 1d63abc866..f67f647c5c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -316,7 +316,6 @@ data NonWrapped You will get the following schema: - ```gql # has wrapper types @@ -492,6 +491,35 @@ rootResolver = GQLRootResolver deityByEvent _ = fetchDeity -- Resolve Old State ``` +### Interface + +1. defining interface with Haskell Types (runtime validation): + + ```hs + -- interface is just regular type derived as interface + newtype Person m = Person {name :: m Text} + deriving (Generic) + + instance GQLType (Person m) where + type KIND (Person m) = INTERFACE + + -- with GQLType user can links interfaces to implementing object + instance GQLType Deity where + implements _ = [interface (Proxy @Person)] + ``` + +2. defining with `importGQLDocument` and `DSL` (compile time validation): + + ```gql + interface Account { + name: String! + } + + type User implements Account { + name: String! + } + ``` + ## Morpheus `GraphQL Client` with Template haskell QuasiQuotes ```hs diff --git a/morpheus-graphql-client/changelog.md b/morpheus-graphql-client/changelog.md index ae3c050752..a34cdd79af 100644 --- a/morpheus-graphql-client/changelog.md +++ b/morpheus-graphql-client/changelog.md @@ -1,3 +1,3 @@ # Changelog -## 0.12.0 Unreleased Changes \ No newline at end of file +## 0.12.0 - 21.05.2020 diff --git a/morpheus-graphql-client/morpheus-graphql-client.cabal b/morpheus-graphql-client/morpheus-graphql-client.cabal index 47962a2dcc..2d940c9131 100644 --- a/morpheus-graphql-client/morpheus-graphql-client.cabal +++ b/morpheus-graphql-client/morpheus-graphql-client.cabal @@ -4,7 +4,7 @@ cabal-version: 1.12 -- -- see: https://github.com/sol/hpack -- --- hash: 04ae4fbb24da17e5e7c58e7efa6e91c56d6e6b1427c0d82d00440e6675ffb084 +-- hash: 8749fc28a63b46eed778a0eb7cfcb2e6f184c7e9c49a7f3a2847b7b735e2599e name: morpheus-graphql-client version: 0.12.0 @@ -46,9 +46,9 @@ library , base >=4.7 && <5 , bytestring >=0.10.4 && <0.11 , morpheus-graphql-core >=0.12.0 - , mtl >=2.0 && <=2.3 - , template-haskell >=2.0 && <=2.16 + , mtl >=2.0 && <=3.0 + , template-haskell >=2.0 && <=3.0 , text >=1.2.3.0 && <1.3 - , transformers >=0.3.0.0 && <0.6 + , transformers >=0.3.0.0 && <1.0 , unordered-containers >=0.2.8.0 && <0.3 default-language: Haskell2010 diff --git a/morpheus-graphql-client/package.yaml b/morpheus-graphql-client/package.yaml index c633660f05..83e6da1473 100644 --- a/morpheus-graphql-client/package.yaml +++ b/morpheus-graphql-client/package.yaml @@ -22,9 +22,9 @@ dependencies: - aeson >= 1.4.4.0 && <= 1.6 - unordered-containers >= 0.2.8.0 && < 0.3 - morpheus-graphql-core >= 0.12.0 - - template-haskell >= 2.0 && <= 2.16 - - transformers >= 0.3.0.0 && < 0.6 - - mtl >= 2.0 && <= 2.3 + - template-haskell >= 2.0 && <= 3.0 + - transformers >= 0.3.0.0 && < 1.0 + - mtl >= 2.0 && <= 3.0 library: source-dirs: src diff --git a/morpheus-graphql-core/changelog.md b/morpheus-graphql-core/changelog.md index 740efbf1ea..2a8d6d1dcc 100644 --- a/morpheus-graphql-core/changelog.md +++ b/morpheus-graphql-core/changelog.md @@ -1,6 +1,6 @@ # Changelog -## 0.12.0 Unreleased Changes +## 0.12.0 - 21.05.2020 ## New features diff --git a/morpheus-graphql-core/morpheus-graphql-core.cabal b/morpheus-graphql-core/morpheus-graphql-core.cabal index 524b8394fe..21b2af3c01 100644 --- a/morpheus-graphql-core/morpheus-graphql-core.cabal +++ b/morpheus-graphql-core/morpheus-graphql-core.cabal @@ -4,7 +4,7 @@ cabal-version: 1.12 -- -- see: https://github.com/sol/hpack -- --- hash: c7c5117b4e595a6e3e329fefdd2b1fe469ae6b558d72a979beb9a4031362b2d4 +-- hash: 4a337fa1d88f2e1ca1eb76ec72c4bd0e5e91ef67626a02682384994f6731d446 name: morpheus-graphql-core version: 0.12.0 @@ -109,9 +109,9 @@ library , hashable >=1.0.0 , megaparsec >=7.0.0 && <9.0.0 , scientific >=0.3.6.2 && <0.4 - , template-haskell >=2.0 && <=2.16 + , template-haskell >=2.0 && <=3.0 , text >=1.2.3.0 && <1.3 - , th-lift-instances >=0.1.1 && <=0.2.0 + , th-lift-instances >=0.1.1 && <=0.3 , transformers >=0.3.0.0 && <0.6 , unordered-containers >=0.2.8.0 && <0.3 , vector >=0.12.0.1 && <0.13 @@ -137,9 +137,9 @@ test-suite morpheus-test , scientific >=0.3.6.2 && <0.4 , tasty , tasty-hunit - , template-haskell >=2.0 && <=2.16 + , template-haskell >=2.0 && <=3.0 , text >=1.2.3.0 && <1.3 - , th-lift-instances >=0.1.1 && <=0.2.0 + , th-lift-instances >=0.1.1 && <=0.3 , transformers >=0.3.0.0 && <0.6 , unordered-containers >=0.2.8.0 && <0.3 , vector >=0.12.0.1 && <0.13 diff --git a/morpheus-graphql-core/package.yaml b/morpheus-graphql-core/package.yaml index e81f14db2e..38e2dba2a9 100644 --- a/morpheus-graphql-core/package.yaml +++ b/morpheus-graphql-core/package.yaml @@ -29,8 +29,8 @@ dependencies: - transformers >= 0.3.0.0 && < 0.6 - scientific >= 0.3.6.2 && < 0.4 - vector >= 0.12.0.1 && < 0.13 - - template-haskell >= 2.0 && <= 2.16 - - th-lift-instances >= 0.1.1 && <= 0.2.0 + - template-haskell >= 2.0 && <= 3.0 + - th-lift-instances >= 0.1.1 && <= 0.3 - hashable >= 1.0.0 library: diff --git a/morpheus-graphql.cabal b/morpheus-graphql.cabal index baaca890cc..c2b0c3638c 100644 --- a/morpheus-graphql.cabal +++ b/morpheus-graphql.cabal @@ -4,7 +4,7 @@ cabal-version: 1.12 -- -- see: https://github.com/sol/hpack -- --- hash: e82e068bd4d9cc31a59b855a0f9ffd3c0ca580f98f818d517c5ea730f34b8437 +-- hash: c98d51df8567b3a33a0b9f3dcf93217534d9f3a1d666f1ac2ab69b5ce6cfe0b6 name: morpheus-graphql version: 0.12.0 @@ -394,16 +394,16 @@ library , containers >=0.4.2.1 && <0.7 , megaparsec >=7.0.0 && <9.0.0 , morpheus-graphql-core >=0.12.0 - , mtl >=2.0 && <=2.3 + , mtl >=2.0 && <=3.0 , scientific >=0.3.6.2 && <0.4 - , template-haskell >=2.0 && <=2.16 + , template-haskell >=2.0 && <=3.0 , text >=1.2.3.0 && <1.3 , transformers >=0.3.0.0 && <0.6 - , unliftio-core >=0.0.1 && <=0.3 + , unliftio-core >=0.0.1 && <=0.4 , unordered-containers >=0.2.8.0 && <0.3 , uuid >=1.0 && <=1.4 , vector >=0.12.0.1 && <0.13 - , websockets >=0.11.0 && <=0.13 + , websockets >=0.11.0 && <=1.0 default-language: Haskell2010 test-suite morpheus-test @@ -442,16 +442,16 @@ test-suite morpheus-test , megaparsec >=7.0.0 && <9.0.0 , morpheus-graphql , morpheus-graphql-core >=0.12.0 - , mtl >=2.0 && <=2.3 + , mtl >=2.0 && <=3.0 , scientific >=0.3.6.2 && <0.4 , tasty , tasty-hunit - , template-haskell >=2.0 && <=2.16 + , template-haskell >=2.0 && <=3.0 , text >=1.2.3.0 && <1.3 , transformers >=0.3.0.0 && <0.6 - , unliftio-core >=0.0.1 && <=0.3 + , unliftio-core >=0.0.1 && <=0.4 , unordered-containers >=0.2.8.0 && <0.3 , uuid >=1.0 && <=1.4 , vector >=0.12.0.1 && <0.13 - , websockets >=0.11.0 && <=0.13 + , websockets >=0.11.0 && <=1.0 default-language: Haskell2010 diff --git a/package.yaml b/package.yaml index 39c524d94a..898027e8b9 100644 --- a/package.yaml +++ b/package.yaml @@ -30,13 +30,13 @@ dependencies: - transformers >= 0.3.0.0 && < 0.6 - scientific >= 0.3.6.2 && < 0.4 - vector >= 0.12.0.1 && < 0.13 - - mtl >= 2.0 && <= 2.3 + - mtl >= 2.0 && <= 3.0 - morpheus-graphql-core >= 0.12.0 - uuid >= 1.0 && <= 1.4 - - websockets >= 0.11.0 && <= 0.13 - - template-haskell >= 2.0 && <= 2.16 - - unliftio-core >= 0.0.1 && <= 0.3 + - websockets >= 0.11.0 && <= 1.0 + - template-haskell >= 2.0 && <= 3.0 + - unliftio-core >= 0.0.1 && <= 0.4 library: source-dirs: src diff --git a/stack-14.14.yaml b/stack-14.14.yaml new file mode 100644 index 0000000000..7196d9fa46 --- /dev/null +++ b/stack-14.14.yaml @@ -0,0 +1,7 @@ +# ghc 8.6.5 +resolver: lts-14.14 +packages: + - examples + - morpheus-graphql-client + - morpheus-graphql-core + - . diff --git a/stack.yaml b/stack.yaml index 7196d9fa46..16134835f2 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,5 +1,5 @@ -# ghc 8.6.5 -resolver: lts-14.14 +# ghc 8.8.3 +resolver: lts-15.13 packages: - examples - morpheus-graphql-client