summaryrefslogtreecommitdiff
path: root/docs/tutorial/tutorial.lhs
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorial/tutorial.lhs')
-rw-r--r--docs/tutorial/tutorial.lhs8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/tutorial/tutorial.lhs b/docs/tutorial/tutorial.lhs
index 39e151c..9ca2db0 100644
--- a/docs/tutorial/tutorial.lhs
+++ b/docs/tutorial/tutorial.lhs
@@ -44,8 +44,8 @@ First we build a GraphQL schema.
> $ HashMap.singleton "hello"
> $ Field Nothing (Out.NamedScalarType string) mempty hello
>
-> hello :: ActionT IO (Out.Value IO)
-> hello = pure $ Out.String "it's me"
+> hello :: ActionT IO Value
+> hello = pure $ String "it's me"
This defines a simple schema with one type and one field, that resolves to a fixed value.
@@ -79,10 +79,10 @@ For this example, we're going to be using time.
> $ HashMap.singleton "time"
> $ Field Nothing (Out.NamedScalarType string) mempty time
>
-> time :: ActionT IO (Out.Value IO)
+> time :: ActionT IO Value
> time = do
> t <- liftIO getCurrentTime
-> pure $ Out.String $ Text.pack $ show t
+> pure $ String $ Text.pack $ show t
This defines a simple schema with one type and one field,
which resolves to the current time.