diff options
| author | Eugen Wissner <belka@caraus.de> | 2020-09-28 07:06:15 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2020-09-28 07:06:15 +0200 |
| commit | 4602eb1df3a713989b155f0140ff8909eb0370cf (patch) | |
| tree | 6c82cab7436516ba79e2c13454e9f47ecd2ec4b4 /tests/Test/RootOperationSpec.hs | |
| parent | ced9b815db516ac4196856c535eedca85f4a1935 (diff) | |
| download | graphql-4602eb1df3a713989b155f0140ff8909eb0370cf.tar.gz | |
Validate arguments are defined
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 |
