diff options
| author | Eugen Wissner <belka@caraus.de> | 2021-04-12 07:09:39 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2021-04-12 07:09:39 +0200 |
| commit | 5654b78935b38a88f3dd4998eb8667a2695aea14 (patch) | |
| tree | a81993de154da6fd7b4f56f176f38ea4fe2df2ac /tests/Language/GraphQL/Validate/RulesSpec.hs | |
| parent | d6dda14cfd1486c6a5648a0a1086a5b5302f1954 (diff) | |
| download | graphql-5654b78935b38a88f3dd4998eb8667a2695aea14.tar.gz | |
Traverse input object properties once
Diffstat (limited to 'tests/Language/GraphQL/Validate/RulesSpec.hs')
| -rw-r--r-- | tests/Language/GraphQL/Validate/RulesSpec.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/Language/GraphQL/Validate/RulesSpec.hs b/tests/Language/GraphQL/Validate/RulesSpec.hs index ce12138..02b14ae 100644 --- a/tests/Language/GraphQL/Validate/RulesSpec.hs +++ b/tests/Language/GraphQL/Validate/RulesSpec.hs @@ -929,3 +929,18 @@ spec = , locations = [AST.Location 4 54] } in validate queryString `shouldBe` [expected] + + it "validates input object properties once" $ + let queryString = [r| + { + findDog(complex: { name: 3 }) { + name + } + } + |] + expected = Error + { message = + "Value 3 cannot be coerced to type \"!String\"." + , locations = [AST.Location 3 46] + } + in validate queryString `shouldBe` [expected] |
