AST.Transform: Pass down a reader

The reader contains variable substitution functions and fragments.
This commit is contained in:
2019-11-06 06:34:36 +01:00
parent 73fc334bf8
commit b77da3d492
4 changed files with 79 additions and 89 deletions

View File

@ -66,7 +66,7 @@ data OperationType = Query | Mutation deriving (Eq, Show)
-- * Selections
-- | "Top-level" selection, selection on a operation.
-- | "Top-level" selection, selection on an operation or fragment.
type SelectionSet = NonEmpty Selection
-- | Field selection.
@ -100,7 +100,7 @@ data Selection
-- * "user", "id" and "name" are field names.
-- * "user" has two subfields, "id" and "name".
-- * "zuck" is an alias for "user". "id" and "name" have no aliases.
-- * "id: 4" is an argument for "name". "id" and "name don't have any
-- * "id: 4" is an argument for "user". "id" and "name" don't have any
-- arguments.
data Field
= Field (Maybe Alias) Name [Argument] [Directive] SelectionSetOpt