summaryrefslogtreecommitdiff
path: root/tests/Test/RootOperationSpec.hs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2020-05-24 13:51:00 +0200
committerEugen Wissner <belka@caraus.de>2020-05-24 13:51:00 +0200
commiteb90a4091c1f2586640ee49d6f91fc83c05239f6 (patch)
tree33fa9acde72cea2048c7b5269f2f576c982804eb /tests/Test/RootOperationSpec.hs
parent7cd48217187911855cd2ad473e58d11df0c69d48 (diff)
downloadgraphql-eb90a4091c1f2586640ee49d6f91fc83c05239f6.tar.gz
Check point
Diffstat (limited to 'tests/Test/RootOperationSpec.hs')
-rw-r--r--tests/Test/RootOperationSpec.hs11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/Test/RootOperationSpec.hs b/tests/Test/RootOperationSpec.hs
index 935b96d..7e20e64 100644
--- a/tests/Test/RootOperationSpec.hs
+++ b/tests/Test/RootOperationSpec.hs
@@ -11,8 +11,8 @@ import qualified Language.GraphQL.Schema as Schema
import Test.Hspec (Spec, describe, it, shouldBe)
import Text.RawString.QQ (r)
import Language.GraphQL.Type.Definition
+import qualified Language.GraphQL.Type.Out as Out
import Language.GraphQL.Type.Schema
-import qualified Language.GraphQL.Type as Type
hatType :: ObjectType IO
hatType = ObjectType "Hat" Nothing
@@ -20,20 +20,19 @@ hatType = ObjectType "Hat" Nothing
$ Field Nothing (ScalarOutputType int) mempty resolve
where
(Schema.Resolver resolverName resolve) =
- Schema.wrappedObject "circumference" $ pure $ Type.I 60
+ Schema.Resolver "circumference" $ pure $ Out.Int 60
schema :: Schema IO
schema = Schema
(ObjectType "Query" Nothing hatField)
(Just $ ObjectType "Mutation" Nothing incrementField)
where
- garment = NestingResolver
- $ pure $ Schema.object
- [ Schema.wrappedObject "circumference" $ pure $ Type.I 60
+ garment = pure $ Schema.object
+ [ Schema.Resolver "circumference" $ pure $ Out.Int 60
]
incrementField = HashMap.singleton "incrementCircumference"
$ Field Nothing (ScalarOutputType int) mempty
- $ NestingResolver $ pure $ Type.I 61
+ $ pure $ Out.Int 61
hatField = HashMap.singleton "garment"
$ Field Nothing (ObjectOutputType hatType) mempty garment