diff options
| author | Danny Navarro <j@dannynavarro.net> | 2016-02-19 19:21:32 +0100 |
|---|---|---|
| committer | Danny Navarro <j@dannynavarro.net> | 2016-02-19 19:21:32 +0100 |
| commit | 770df827181f71b87aa286910cc7873a34edcede (patch) | |
| tree | 78680f9444777a505d1957175acfc0c2a800d41c /Data/GraphQL/Execute.hs | |
| parent | 8ee50727bde4779ba5c3aa98f74e669ada66bb26 (diff) | |
| download | graphql-770df827181f71b87aa286910cc7873a34edcede.tar.gz | |
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.
Diffstat (limited to 'Data/GraphQL/Execute.hs')
| -rw-r--r-- | Data/GraphQL/Execute.hs | 7 |
1 files changed, 3 insertions, 4 deletions
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))]) = |
