From 61dbe6c7280a899b485146aa8557948417e78360 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Mon, 25 May 2020 07:41:21 +0200 Subject: Split input/output types and values into 2 modules --- tests/Test/RootOperationSpec.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/Test/RootOperationSpec.hs') diff --git a/tests/Test/RootOperationSpec.hs b/tests/Test/RootOperationSpec.hs index 7e20e64..a20dc51 100644 --- a/tests/Test/RootOperationSpec.hs +++ b/tests/Test/RootOperationSpec.hs @@ -14,27 +14,27 @@ import Language.GraphQL.Type.Definition import qualified Language.GraphQL.Type.Out as Out import Language.GraphQL.Type.Schema -hatType :: ObjectType IO -hatType = ObjectType "Hat" Nothing +hatType :: Out.ObjectType IO +hatType = Out.ObjectType "Hat" Nothing $ HashMap.singleton resolverName - $ Field Nothing (ScalarOutputType int) mempty resolve + $ Out.Field Nothing (Out.NamedScalarType int) mempty resolve where (Schema.Resolver resolverName resolve) = Schema.Resolver "circumference" $ pure $ Out.Int 60 schema :: Schema IO schema = Schema - (ObjectType "Query" Nothing hatField) - (Just $ ObjectType "Mutation" Nothing incrementField) + (Out.ObjectType "Query" Nothing hatField) + (Just $ Out.ObjectType "Mutation" Nothing incrementField) where garment = pure $ Schema.object [ Schema.Resolver "circumference" $ pure $ Out.Int 60 ] incrementField = HashMap.singleton "incrementCircumference" - $ Field Nothing (ScalarOutputType int) mempty + $ Out.Field Nothing (Out.NamedScalarType int) mempty $ pure $ Out.Int 61 hatField = HashMap.singleton "garment" - $ Field Nothing (ObjectOutputType hatType) mempty garment + $ Out.Field Nothing (Out.NamedObjectType hatType) mempty garment spec :: Spec spec = -- cgit v1.2.3