Support variables in AST transformation

This commit is contained in:
Danny Navarro
2017-02-12 15:19:13 -03:00
parent e716bc57e7
commit b7a72591fd
3 changed files with 57 additions and 33 deletions

View File

@ -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.