From 4602eb1df3a713989b155f0140ff8909eb0370cf Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Mon, 28 Sep 2020 07:06:15 +0200 Subject: Validate arguments are defined --- tests/Test/StarWars/Schema.hs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'tests/Test/StarWars/Schema.hs') diff --git a/tests/Test/StarWars/Schema.hs b/tests/Test/StarWars/Schema.hs index 34a6a35..706d9b3 100644 --- a/tests/Test/StarWars/Schema.hs +++ b/tests/Test/StarWars/Schema.hs @@ -1,7 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Test.StarWars.Schema - ( schema + ( starWarsSchema ) where import Control.Monad.Catch (MonadThrow(..), SomeException) @@ -17,12 +17,8 @@ import Prelude hiding (id) -- See https://github.com/graphql/graphql-js/blob/master/src/__tests__/starWarsSchema.js -schema :: Schema (Either SomeException) -schema = Schema - { query = queryType - , mutation = Nothing - , subscription = Nothing - } +starWarsSchema :: Schema (Either SomeException) +starWarsSchema = schema queryType where queryType = Out.ObjectType "Query" Nothing [] $ HashMap.fromList [ ("hero", heroFieldResolver) -- cgit v1.2.3