diff options
Diffstat (limited to 'tests/Test/RootOperationSpec.hs')
| -rw-r--r-- | tests/Test/RootOperationSpec.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/Test/RootOperationSpec.hs b/tests/Test/RootOperationSpec.hs index ea89279..33b5d3b 100644 --- a/tests/Test/RootOperationSpec.hs +++ b/tests/Test/RootOperationSpec.hs @@ -23,11 +23,12 @@ hatType = Out.ObjectType "Hat" Nothing [] $ ValueResolver (Out.Field Nothing (Out.NamedScalarType int) mempty) $ pure $ Int 60 -schema :: Schema IO -schema = Schema +garmentSchema :: Schema IO +garmentSchema = Schema { query = Out.ObjectType "Query" Nothing [] hatFieldResolver , mutation = Just $ Out.ObjectType "Mutation" Nothing [] incrementFieldResolver , subscription = Nothing + , directives = HashMap.empty } where garment = pure $ Object $ HashMap.fromList @@ -57,7 +58,7 @@ spec = [ "circumference" .= (60 :: Int) ] ] - actual <- graphql schema querySource + actual <- graphql garmentSchema querySource actual `shouldResolveTo` expected it "chooses Mutation" $ do @@ -70,5 +71,5 @@ spec = $ object [ "incrementCircumference" .= (61 :: Int) ] - actual <- graphql schema querySource + actual <- graphql garmentSchema querySource actual `shouldResolveTo` expected |
