Add Union and Interface type definitions

This commit is contained in:
2020-05-26 11:13:55 +02:00
parent 61dbe6c728
commit c06d0b8e95
11 changed files with 229 additions and 124 deletions

View File

@ -25,7 +25,7 @@ import Test.StarWars.Data
schema :: Schema Identity
schema = Schema { query = queryType, mutation = Nothing }
where
queryType = Out.ObjectType "Query" Nothing $ HashMap.fromList
queryType = Out.ObjectType "Query" Nothing [] $ HashMap.fromList
[ ("hero", Out.Field Nothing (Out.NamedScalarType string) mempty hero)
, ("human", Out.Field Nothing (Out.NamedScalarType string) mempty human)
, ("droid", Out.Field Nothing (Out.NamedScalarType string) mempty droid)