diff options
| author | Eugen Wissner <belka@caraus.de> | 2020-09-16 09:12:49 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2020-09-16 09:12:49 +0200 |
| commit | 6e644c5b4b3a8284ed0a1f0a84fef775f70a68d6 (patch) | |
| tree | 56cac7b46b3621c8621e5f8026e275c3b464394d /tests | |
| parent | 4c10ce92041dc73a95aeb64aca241dd937ffaa5c (diff) | |
| download | graphql-6e644c5b4b3a8284ed0a1f0a84fef775f70a68d6.tar.gz | |
Move path to the execution error
Since it isn't possible to get a path during validation, without
executing the query.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Language/GraphQL/ErrorSpec.hs | 2 | ||||
| -rw-r--r-- | tests/Language/GraphQL/ValidateSpec.hs | 14 |
2 files changed, 1 insertions, 15 deletions
diff --git a/tests/Language/GraphQL/ErrorSpec.hs b/tests/Language/GraphQL/ErrorSpec.hs index 1497c48..38d7d3a 100644 --- a/tests/Language/GraphQL/ErrorSpec.hs +++ b/tests/Language/GraphQL/ErrorSpec.hs @@ -19,6 +19,6 @@ import Test.Hspec ( Spec spec :: Spec spec = describe "singleError" $ it "constructs an error with the given message" $ - let errors'' = Seq.singleton $ Error "Message." [] + let errors'' = Seq.singleton $ Error "Message." [] [] expected = Response Aeson.Null errors'' in singleError "Message." `shouldBe` expected diff --git a/tests/Language/GraphQL/ValidateSpec.hs b/tests/Language/GraphQL/ValidateSpec.hs index c6d8487..53f63aa 100644 --- a/tests/Language/GraphQL/ValidateSpec.hs +++ b/tests/Language/GraphQL/ValidateSpec.hs @@ -168,7 +168,6 @@ spec = { message = "Definition must be OperationDefinition or FragmentDefinition." , locations = [AST.Location 9 15] - , path = [] } in validate queryString `shouldBe` Seq.singleton expected @@ -186,7 +185,6 @@ spec = { message = "Subscription sub must select only one top level field." , locations = [AST.Location 2 15] - , path = [] } in validate queryString `shouldBe` Seq.singleton expected @@ -208,7 +206,6 @@ spec = { message = "Subscription sub must select only one top level field." , locations = [AST.Location 2 15] - , path = [] } in validate queryString `shouldBe` Seq.singleton expected @@ -232,7 +229,6 @@ spec = { message = "This anonymous operation must be the only defined operation." , locations = [AST.Location 2 15] - , path = [] } in validate queryString `shouldBe` Seq.singleton expected @@ -254,7 +250,6 @@ spec = { message = "There can be only one operation named \"dogOperation\"." , locations = [AST.Location 2 15, AST.Location 8 15] - , path = [] } in validate queryString `shouldBe` Seq.singleton expected @@ -280,7 +275,6 @@ spec = { message = "There can be only one fragment named \"fragmentOne\"." , locations = [AST.Location 8 15, AST.Location 12 15] - , path = [] } in validate queryString `shouldBe` Seq.singleton expected @@ -296,7 +290,6 @@ spec = { message = "Fragment target \"undefinedFragment\" is undefined." , locations = [AST.Location 4 19] - , path = [] } in validate queryString `shouldBe` Seq.singleton expected @@ -316,7 +309,6 @@ spec = "Fragment \"notOnExistingType\" is specified on type \ \\"NotInSchema\" which doesn't exist in the schema." , locations = [AST.Location 4 19] - , path = [] } in validate queryString `shouldBe` Seq.singleton expected @@ -333,7 +325,6 @@ spec = "Inline fragment is specified on type \"NotInSchema\" \ \which doesn't exist in the schema." , locations = [AST.Location 3 17] - , path = [] } in validate queryString `shouldBe` Seq.singleton expected @@ -353,7 +344,6 @@ spec = "Fragment cannot condition on non composite type \ \\"Int\"." , locations = [AST.Location 7 15] - , path = [] } in validate queryString `shouldBe` Seq.singleton expected @@ -370,7 +360,6 @@ spec = "Fragment cannot condition on non composite type \ \\"Boolean\"." , locations = [AST.Location 3 17] - , path = [] } in validate queryString `shouldBe` Seq.singleton expected @@ -390,7 +379,6 @@ spec = { message = "Fragment \"nameFragment\" is never used." , locations = [AST.Location 2 15] - , path = [] } in validate queryString `shouldBe` Seq.singleton expected @@ -416,7 +404,6 @@ spec = \itself (via barkVolumeFragment -> nameFragment -> \ \barkVolumeFragment)." , locations = [AST.Location 11 15] - , path = [] } error2 = Error { message = @@ -424,6 +411,5 @@ spec = \(via nameFragment -> barkVolumeFragment -> \ \nameFragment)." , locations = [AST.Location 7 15] - , path = [] } in validate queryString `shouldBe` Seq.fromList [error1, error2] |
