From 4ccae2adbac2116f66e4f4933696c1c2b6a2b154 Mon Sep 17 00:00:00 2001 From: Adrian Sieber <mail@adriansieber.com> Date: Sun, 4 May 2025 21:08:50 +0000 Subject: [PATCH] Upgrade GHC to 9.8 and upgrade dependencies --- package.yaml | 20 +++++++++----------- source/AirGQL/Types/OutObjectType.hs | 3 +++ tests/Tests/IntrospectionSpec.hs | 2 +- tests/Tests/MutationSpec.hs | 7 ++----- tests/Tests/QuerySpec.hs | 2 +- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/package.yaml b/package.yaml index 8b01046..e0e7214 100644 --- a/package.yaml +++ b/package.yaml @@ -30,9 +30,9 @@ flags: default: false dependencies: - - base >= 4.18.2 && < 4.19 + - base >= 4.18.2 && < 4.20 - protolude >= 0.3.4 && < 0.4 - - text >= 2.0.2 && < 2.1 + - text >= 2.0 && < 2.2 - sqlite-simple >= 0.4.19 && < 0.5 default-extensions: @@ -55,6 +55,7 @@ default-extensions: - OverloadedStrings - RankNTypes - RecordWildCards + - RoleAnnotations - ScopedTypeVariables - StandaloneDeriving - TupleSections @@ -79,14 +80,14 @@ library: dependencies: - aeson >= 2.1.2.1 && < 2.3 - blaze-markup >= 0.8.3 && < 0.9 - - bytestring >= 0.11.5 && < 0.12 + - bytestring >= 0.11 && < 0.13 - conduit >= 1.3.5 && < 1.4 - directory >= 1.3.8 && < 1.4 - double-x-encoding >= 1.2.1 && < 1.3 - exceptions >= 0.10.7 && < 0.11 - extra >= 1.7.14 && < 1.8 - filepath >= 1.4.200 && < 1.5 - - graphql >= 1.2.0.1 && < 1.4 + - graphql >= 1.2 && < 1.6 - graphql-spice >= 1.0.2 && < 1.1 - http-types >= 0.12.4 && < 0.13 - process >= 1.6.17 && < 1.7 @@ -96,8 +97,8 @@ library: - servant-docs >= 0.13 && < 0.14 - servant-multipart >= 0.12.1 && < 0.13 - servant-server >= 0.20 && < 0.21 - - simple-sql-parser >= 0.6.1 && < 0.8 - - template-haskell >= 2.20.0 && < 2.21 + - simple-sql-parser >= 0.6 && < 0.9 + - template-haskell >= 2.20.0 && < 2.22 - time >= 1.12.2 && < 1.13 - typed-process >= 0.2.11 && < 0.3 - unix >= 2.8.4 && < 2.9 @@ -122,7 +123,7 @@ executables: - http-client >= 0.7.17 && < 0.8 - wai >= 3.2.4 && < 3.3 - wai-cors >= 0.2.7 && < 0.3 - - warp >= 3.3.31 && < 3.4 + - warp >= 3.3.31 && < 3.5 tests: airgql-test: @@ -131,14 +132,11 @@ tests: dependencies: - aeson >= 2.1.2.1 && < 2.3 - airgql - - bytestring >= 0.11.5 && < 0.12 + - bytestring >= 0.11 && < 0.13 - directory >= 1.3.8 && < 1.4 - - exceptions >= 0.10.7 && < 0.11 - filepath >= 1.4.200 && < 1.5 - - graphql >= 1.2.0.1 && < 1.4 - graphql-spice >= 1.0.2 && < 1.1 - hspec >= 2.11.8 && < 2.12 - servant-server >= 0.20 && < 0.21 - unix >= 2.8.4 && < 2.9 - - unordered-containers >= 0.2.20 && < 0.3 - vector >=0.13.0.0 && < 0.14 diff --git a/source/AirGQL/Types/OutObjectType.hs b/source/AirGQL/Types/OutObjectType.hs index 7a43ace..3671929 100644 --- a/source/AirGQL/Types/OutObjectType.hs +++ b/source/AirGQL/Types/OutObjectType.hs @@ -19,6 +19,9 @@ data OutObjectType m = OutObjectType } +type role OutObjectType nominal + + outObjectTypeToObjectType :: OutObjectType m -> Out.ObjectType m outObjectTypeToObjectType objectType = Out.ObjectType diff --git a/tests/Tests/IntrospectionSpec.hs b/tests/Tests/IntrospectionSpec.hs index e86eba1..e47cde8 100644 --- a/tests/Tests/IntrospectionSpec.hs +++ b/tests/Tests/IntrospectionSpec.hs @@ -17,8 +17,8 @@ import Protolude ( import Data.Aeson qualified as Ae import Database.SQLite.Simple qualified as SS import Database.SQLite.Simple.QQ (sql) +import Language.GraphQL.Class (gql) import Language.GraphQL.JSON (graphql) -import Language.GraphQL.TH (gql) import System.Directory (makeAbsolute) import System.FilePath ((</>)) import Test.Hspec (Spec, describe, it, shouldBe) diff --git a/tests/Tests/MutationSpec.hs b/tests/Tests/MutationSpec.hs index b2b8d89..009cda8 100644 --- a/tests/Tests/MutationSpec.hs +++ b/tests/Tests/MutationSpec.hs @@ -18,8 +18,8 @@ import Data.Aeson qualified as Ae import Data.Aeson.KeyMap qualified as KeyMap import Database.SQLite.Simple qualified as SS import Database.SQLite.Simple.QQ (sql) +import Language.GraphQL.Class (gql) import Language.GraphQL.JSON (graphql) -import Language.GraphQL.TH (gql) import System.FilePath ((</>)) import Test.Hspec (Spec, describe, it, shouldBe) @@ -617,10 +617,7 @@ main = void $ do SQLPost{query = "SELECT * from loaders"} restResult.rows - `shouldBe` [ KeyMap.singleton - "progress" - (Ae.Number 1.23) - ] + `shouldBe` [KeyMap.singleton "progress" (Ae.Number 1.23)] it "supports variables" $ do let diff --git a/tests/Tests/QuerySpec.hs b/tests/Tests/QuerySpec.hs index 14d0eef..f55e544 100644 --- a/tests/Tests/QuerySpec.hs +++ b/tests/Tests/QuerySpec.hs @@ -19,8 +19,8 @@ import Protolude ( import Data.Aeson qualified as Ae import Database.SQLite.Simple qualified as SS import Database.SQLite.Simple.QQ (sql) +import Language.GraphQL.Class (gql) import Language.GraphQL.JSON (graphql) -import Language.GraphQL.TH (gql) import System.FilePath ((</>)) import Test.Hspec (Spec, before_, describe, it, shouldBe, shouldContain)