summaryrefslogtreecommitdiff
path: root/tests/Test/RootOperationSpec.hs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2020-06-03 07:20:38 +0200
committerEugen Wissner <belka@caraus.de>2020-06-03 07:20:38 +0200
commit93a04032886976b540f5fdb1417bd085a642f772 (patch)
tree712dda8a81286e0e39719a25f798ce23bb574e69 /tests/Test/RootOperationSpec.hs
parentd12577ae717512979c7654191ca65f25fc877907 (diff)
downloadgraphql-93a04032886976b540f5fdb1417bd085a642f772.tar.gz
Resolve abstract types
Objects that can be a part of an union or interface should return __typename as string.
Diffstat (limited to 'tests/Test/RootOperationSpec.hs')
-rw-r--r--tests/Test/RootOperationSpec.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/Test/RootOperationSpec.hs b/tests/Test/RootOperationSpec.hs
index 3b21788..922e098 100644
--- a/tests/Test/RootOperationSpec.hs
+++ b/tests/Test/RootOperationSpec.hs
@@ -16,7 +16,7 @@ import Language.GraphQL.Type.Schema
hatType :: Out.ObjectType IO
hatType = Out.ObjectType "Hat" Nothing []
$ HashMap.singleton "circumference"
- $ Out.Field Nothing (Out.NamedScalarType int) mempty
+ $ Out.Resolver (Out.Field Nothing (Out.NamedScalarType int) mempty)
$ pure $ Int 60
schema :: Schema IO
@@ -28,10 +28,10 @@ schema = Schema
[ ("circumference", Int 60)
]
incrementField = HashMap.singleton "incrementCircumference"
- $ Out.Field Nothing (Out.NamedScalarType int) mempty
+ $ Out.Resolver (Out.Field Nothing (Out.NamedScalarType int) mempty)
$ pure $ Int 61
hatField = HashMap.singleton "garment"
- $ Out.Field Nothing (Out.NamedObjectType hatType) mempty garment
+ $ Out.Resolver (Out.Field Nothing (Out.NamedObjectType hatType) mempty) garment
spec :: Spec
spec =