summaryrefslogtreecommitdiff
path: root/tests/Test/FragmentSpec.hs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2020-05-26 11:13:55 +0200
committerEugen Wissner <belka@caraus.de>2020-05-26 11:13:55 +0200
commitc06d0b8e95ea4b87eab69da085cb32dbd052c1f0 (patch)
tree12bcabe076d873f2676b33c6f510dba566352756 /tests/Test/FragmentSpec.hs
parent61dbe6c7280a899b485146aa8557948417e78360 (diff)
downloadgraphql-c06d0b8e95ea4b87eab69da085cb32dbd052c1f0.tar.gz
Add Union and Interface type definitions
Diffstat (limited to 'tests/Test/FragmentSpec.hs')
-rw-r--r--tests/Test/FragmentSpec.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/Test/FragmentSpec.hs b/tests/Test/FragmentSpec.hs
index 2fb12d2..1f765a4 100644
--- a/tests/Test/FragmentSpec.hs
+++ b/tests/Test/FragmentSpec.hs
@@ -51,14 +51,14 @@ hasErrors (Object object') = HashMap.member "errors" object'
hasErrors _ = True
shirtType :: Out.ObjectType IO
-shirtType = Out.ObjectType "Shirt" Nothing
+shirtType = Out.ObjectType "Shirt" Nothing []
$ HashMap.singleton resolverName
$ Out.Field Nothing (Out.NamedScalarType string) mempty resolve
where
(Schema.Resolver resolverName resolve) = size
hatType :: Out.ObjectType IO
-hatType = Out.ObjectType "Hat" Nothing
+hatType = Out.ObjectType "Hat" Nothing []
$ HashMap.singleton resolverName
$ Out.Field Nothing (Out.NamedScalarType int) mempty resolve
where
@@ -69,7 +69,7 @@ toSchema (Schema.Resolver resolverName resolve) = Schema
{ query = queryType, mutation = Nothing }
where
unionMember = if resolverName == "Hat" then hatType else shirtType
- queryType = Out.ObjectType "Query" Nothing
+ queryType = Out.ObjectType "Query" Nothing []
$ HashMap.singleton resolverName
$ Out.Field Nothing (Out.NamedObjectType unionMember) mempty resolve