forked from OSS/graphql
Support variables in AST transformation
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user