summaryrefslogtreecommitdiff
path: root/tests/Test/RootOperationSpec.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Test/RootOperationSpec.hs')
-rw-r--r--tests/Test/RootOperationSpec.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/Test/RootOperationSpec.hs b/tests/Test/RootOperationSpec.hs
index 33b5d3b..1921ec9 100644
--- a/tests/Test/RootOperationSpec.hs
+++ b/tests/Test/RootOperationSpec.hs
@@ -24,13 +24,10 @@ hatType = Out.ObjectType "Hat" Nothing []
$ pure $ Int 60
garmentSchema :: Schema IO
-garmentSchema = Schema
- { query = Out.ObjectType "Query" Nothing [] hatFieldResolver
- , mutation = Just $ Out.ObjectType "Mutation" Nothing [] incrementFieldResolver
- , subscription = Nothing
- , directives = HashMap.empty
- }
+garmentSchema = schema queryType (Just mutationType) Nothing mempty
where
+ queryType = Out.ObjectType "Query" Nothing [] hatFieldResolver
+ mutationType = Out.ObjectType "Mutation" Nothing [] incrementFieldResolver
garment = pure $ Object $ HashMap.fromList
[ ("circumference", Int 60)
]