From d12577ae717512979c7654191ca65f25fc877907 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Wed, 27 May 2020 23:18:35 +0200 Subject: Define resolvers on type fields Returning resolvers from other resolvers isn't supported anymore. Since we have a type system now, we define the resolvers in the object type fields and pass an object with the previous result to them. --- tests/Language/GraphQL/Type/OutSpec.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/Language/GraphQL/Type') diff --git a/tests/Language/GraphQL/Type/OutSpec.hs b/tests/Language/GraphQL/Type/OutSpec.hs index 48b7fa4..bdc2094 100644 --- a/tests/Language/GraphQL/Type/OutSpec.hs +++ b/tests/Language/GraphQL/Type/OutSpec.hs @@ -3,13 +3,12 @@ module Language.GraphQL.Type.OutSpec ( spec ) where -import Data.Functor.Identity (Identity) -import qualified Language.GraphQL.Type.Out as Out +import Language.GraphQL.Type.Definition import Test.Hspec (Spec, describe, it, shouldBe) spec :: Spec spec = describe "Value" $ it "supports overloaded strings" $ - let string = "Goldstaub abblasen." :: (Out.Value Identity) - in string `shouldBe` Out.String "Goldstaub abblasen." + let nietzsche = "Goldstaub abblasen." :: Value + in nietzsche `shouldBe` String "Goldstaub abblasen." -- cgit v1.2.3