summaryrefslogtreecommitdiff
path: root/Data/GraphQL/Schema.hs
diff options
context:
space:
mode:
authorDanny Navarro <j@dannynavarro.net>2017-02-12 15:19:13 -0300
committerDanny Navarro <j@dannynavarro.net>2017-02-13 15:19:13 -0300
commitb7a72591fd08df9df678e5e7db3304b5a2e75ae9 (patch)
tree5ba38201af492ec69e5467f4ed00bed88a3a1b09 /Data/GraphQL/Schema.hs
parente716bc57e786e1d9b733c3a2782fdf27007b3e23 (diff)
downloadgraphql-b7a72591fd08df9df678e5e7db3304b5a2e75ae9.tar.gz
Support variables in AST transformation
Diffstat (limited to 'Data/GraphQL/Schema.hs')
-rw-r--r--Data/GraphQL/Schema.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/Data/GraphQL/Schema.hs b/Data/GraphQL/Schema.hs
index 548c4eb..4acc4ac 100644
--- a/Data/GraphQL/Schema.hs
+++ b/Data/GraphQL/Schema.hs
@@ -48,7 +48,7 @@ type Fields = [Field]
type Arguments = [Argument]
-- | Variable substitution function.
-type Subs = Text -> Maybe Text
+type Subs = Name -> Maybe Value
-- | Create a new 'Resolver' with the given 'Name' from the given 'Resolver's.
object :: Alternative f => Name -> Resolvers f -> Resolver f
@@ -110,7 +110,6 @@ withField name f (Field alias name' _ _) =
where
aliasOrName = fromMaybe name alias
-
-- | Takes a list of 'Resolver's and a list of 'Field's and applies each
-- 'Resolver' to each 'Field'. Resolves into a value containing the
-- resolved 'Field', or a null value and error information.