From 93527ca81b554044efd273dc2d978f7aebdb2ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20John=20Duncan=20Ara=C3=BAz?= Date: Sat, 23 Nov 2019 10:25:43 -0500 Subject: [PATCH] Update README.md with changes from #224 With the merged pull request #224, version 0.4.0 allows handlers to return errors. This change requires the use of a different function in the handler. This file change updates the README.md file to reflect this updated version. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 44d766c..8c27eff 100644 --- a/README.md +++ b/README.md @@ -44,13 +44,13 @@ import Data.Monoid ((<>)) import GraphQL import GraphQL.API -import GraphQL.Resolver (Handler) +import GraphQL.Resolver (Handler, returns) type Hello = Object "Hello" '[] '[ Argument "who" Text :> Field "greeting" Text ] hello :: Handler IO Hello -hello = pure (\who -> pure ("Hello " <> who)) +hello = pure (\who -> returns ("Hello " <> who)) run :: Text -> IO Response run = interpretAnonymousQuery @Hello hello