From 7ea76865e628b348fb8d5089aed9cc300cc653be Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 1 Dec 2024 21:47:29 +0100 Subject: Validate the subscription root MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …not to be an introspection field. --- tests/Language/GraphQL/Validate/RulesSpec.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/Language/GraphQL/Validate/RulesSpec.hs') diff --git a/tests/Language/GraphQL/Validate/RulesSpec.hs b/tests/Language/GraphQL/Validate/RulesSpec.hs index af3b38e..9ec74c3 100644 --- a/tests/Language/GraphQL/Validate/RulesSpec.hs +++ b/tests/Language/GraphQL/Validate/RulesSpec.hs @@ -18,7 +18,7 @@ import qualified Language.GraphQL.AST.DirectiveLocation as DirectiveLocation import qualified Language.GraphQL.Type.In as In import qualified Language.GraphQL.Type.Out as Out import Language.GraphQL.Validate -import Test.Hspec (Spec, context, describe, it, shouldBe, shouldContain, xit) +import Test.Hspec (Spec, context, describe, it, shouldBe, shouldContain) import Text.Megaparsec (parse, errorBundlePretty) petSchema :: Schema IO @@ -206,14 +206,14 @@ spec = } in validate queryString `shouldContain` [expected] - xit "rejects an introspection field as the subscription root" $ + it "rejects an introspection field as the subscription root" $ let queryString = "subscription sub {\n\ \ __typename\n\ \}" expected = Error { message = - "Subscription \"sub\" must select only one top \ - \level field." + "Subscription \"sub\" must select exactly one top \ + \level field, which must not be an introspection field." , locations = [AST.Location 1 1] } in validate queryString `shouldContain` [expected] -- cgit v1.2.3