summaryrefslogtreecommitdiff
path: root/tests/Language/GraphQL/Type
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2020-05-27 23:18:35 +0200
committerEugen Wissner <belka@caraus.de>2020-05-29 13:53:51 +0200
commitd12577ae717512979c7654191ca65f25fc877907 (patch)
tree17eda8d92d92ef2773c439d614f00ea0e74ea969 /tests/Language/GraphQL/Type
parentc06d0b8e95ea4b87eab69da085cb32dbd052c1f0 (diff)
downloadgraphql-d12577ae717512979c7654191ca65f25fc877907.tar.gz
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.
Diffstat (limited to 'tests/Language/GraphQL/Type')
-rw-r--r--tests/Language/GraphQL/Type/OutSpec.hs7
1 files changed, 3 insertions, 4 deletions
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."