diff options
| author | Eugen Wissner <belka@caraus.de> | 2020-05-25 07:41:21 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2020-05-25 07:41:21 +0200 |
| commit | 61dbe6c7280a899b485146aa8557948417e78360 (patch) | |
| tree | 2b3bb2ea7144dd57a44076ab8f5af3321d5a95f1 /tests/Test/RootOperationSpec.hs | |
| parent | eb90a4091c1f2586640ee49d6f91fc83c05239f6 (diff) | |
| download | graphql-61dbe6c7280a899b485146aa8557948417e78360.tar.gz | |
Split input/output types and values into 2 modules
Diffstat (limited to 'tests/Test/RootOperationSpec.hs')
| -rw-r--r-- | tests/Test/RootOperationSpec.hs | 14 |
1 files changed, 7 insertions, 7 deletions
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 = |
