From 770df827181f71b87aa286910cc7873a34edcede Mon Sep 17 00:00:00 2001 From: Danny Navarro Date: Fri, 19 Feb 2016 19:21:32 +0100 Subject: Simplify Schema definition API Now there is one `Resolver` type and the `Output` and `Scalar` types have been removed. This should be closer to the final Schema definition API. --- Data/GraphQL/Execute.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Data/GraphQL/Execute.hs') diff --git a/Data/GraphQL/Execute.hs b/Data/GraphQL/Execute.hs index ba1eded..8d0335d 100644 --- a/Data/GraphQL/Execute.hs +++ b/Data/GraphQL/Execute.hs @@ -14,10 +14,9 @@ import Data.GraphQL.Schema (Schema(..)) import qualified Data.GraphQL.Schema as Schema execute - :: Alternative m - => Schema m -> Schema.Subs -> Document -> m Aeson.Value -execute (Schema resolvm) subs = - fmap Aeson.toJSON . Schema.withFields resolvm . rootFields subs + :: Alternative f + => Schema.Schema f -> Schema.Subs -> Document -> f Aeson.Value +execute (Schema resolvs) subs = Schema.resolvers resolvs . rootFields subs rootFields :: Schema.Subs -> Document -> [Field] rootFields subs (Document [DefinitionOperation (Query (Node _varDefs _ _ sels))]) = -- cgit v1.2.3