summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2020-05-26 11:13:55 +0200
committerEugen Wissner <belka@caraus.de>2020-05-26 11:13:55 +0200
commitc06d0b8e95ea4b87eab69da085cb32dbd052c1f0 (patch)
tree12bcabe076d873f2676b33c6f510dba566352756 /docs
parent61dbe6c7280a899b485146aa8557948417e78360 (diff)
downloadgraphql-c06d0b8e95ea4b87eab69da085cb32dbd052c1f0.tar.gz
Add Union and Interface type definitions
Diffstat (limited to 'docs')
-rw-r--r--docs/tutorial/tutorial.lhs6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/tutorial/tutorial.lhs b/docs/tutorial/tutorial.lhs
index e80e8c7..39e151c 100644
--- a/docs/tutorial/tutorial.lhs
+++ b/docs/tutorial/tutorial.lhs
@@ -40,7 +40,7 @@ First we build a GraphQL schema.
> schema1 = Schema queryType Nothing
>
> queryType :: ObjectType IO
-> queryType = ObjectType "Query" Nothing
+> queryType = ObjectType "Query" Nothing []
> $ HashMap.singleton "hello"
> $ Field Nothing (Out.NamedScalarType string) mempty hello
>
@@ -75,7 +75,7 @@ For this example, we're going to be using time.
> schema2 = Schema queryType2 Nothing
>
> queryType2 :: ObjectType IO
-> queryType2 = ObjectType "Query" Nothing
+> queryType2 = ObjectType "Query" Nothing []
> $ HashMap.singleton "time"
> $ Field Nothing (Out.NamedScalarType string) mempty time
>
@@ -139,7 +139,7 @@ Now that we have two resolvers, we can define a schema which uses them both.
> schema3 = Schema queryType3 Nothing
>
> queryType3 :: ObjectType IO
-> queryType3 = ObjectType "Query" Nothing $ HashMap.fromList
+> queryType3 = ObjectType "Query" Nothing [] $ HashMap.fromList
> [ ("hello", Field Nothing (Out.NamedScalarType string) mempty hello)
> , ("time", Field Nothing (Out.NamedScalarType string) mempty time)
> ]