summaryrefslogtreecommitdiff
path: root/tests/Language/GraphQL
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2020-10-07 05:24:51 +0200
committerEugen Wissner <belka@caraus.de>2020-10-07 05:24:51 +0200
commit7c0b0ace4dacbb581669f88b83b9643a83fc797a (patch)
treeec9e5a55764c63203f09fc5c9b60990cd4b2aac7 /tests/Language/GraphQL
parenta91bc7f2d218ea2df308d3968587b60351625150 (diff)
downloadgraphql-7c0b0ace4dacbb581669f88b83b9643a83fc797a.tar.gz
Collect types once the schema is created
Diffstat (limited to 'tests/Language/GraphQL')
-rw-r--r--tests/Language/GraphQL/ExecuteSpec.hs7
-rw-r--r--tests/Language/GraphQL/ValidateSpec.hs7
2 files changed, 2 insertions, 12 deletions
diff --git a/tests/Language/GraphQL/ExecuteSpec.hs b/tests/Language/GraphQL/ExecuteSpec.hs
index e6dd8d9..f6e3e6f 100644
--- a/tests/Language/GraphQL/ExecuteSpec.hs
+++ b/tests/Language/GraphQL/ExecuteSpec.hs
@@ -26,12 +26,7 @@ import Text.Megaparsec (parse)
import Text.RawString.QQ (r)
philosopherSchema :: Schema (Either SomeException)
-philosopherSchema = Schema
- { query = queryType
- , mutation = Nothing
- , subscription = Just subscriptionType
- , directives = HashMap.empty
- }
+philosopherSchema = schema queryType Nothing (Just subscriptionType) mempty
queryType :: Out.ObjectType (Either SomeException)
queryType = Out.ObjectType "Query" Nothing []
diff --git a/tests/Language/GraphQL/ValidateSpec.hs b/tests/Language/GraphQL/ValidateSpec.hs
index 92b3001..3bfa018 100644
--- a/tests/Language/GraphQL/ValidateSpec.hs
+++ b/tests/Language/GraphQL/ValidateSpec.hs
@@ -22,12 +22,7 @@ import Text.Megaparsec (parse)
import Text.RawString.QQ (r)
petSchema :: Schema IO
-petSchema = Schema
- { query = queryType
- , mutation = Nothing
- , subscription = Just subscriptionType
- , directives = HashMap.empty
- }
+petSchema = schema queryType Nothing (Just subscriptionType) mempty
queryType :: ObjectType IO
queryType = ObjectType "Query" Nothing [] $ HashMap.fromList