Skip to content

Commit 0023709

Browse files
committed
Annotate PositionInfo
1 parent df6d2eb commit 0023709

File tree

1 file changed

+4
-0
lines changed
  • src/GraphQL/Internal/Syntax

1 file changed

+4
-0
lines changed

src/GraphQL/Internal/Syntax/AST.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ data QueryDocument = QueryDocument {
6868
, position :: PositionInfo
6969
} deriving (Eq,Show)
7070

71+
-- | PositionInfo for a start position and an end position.
72+
--
73+
-- When the AST is constructed elsewhere(not by parsing), for encoding as an example,
74+
-- the PositionInfo shall be Nothing
7175
type PositionInfo = Maybe (Int, Int)
7276
data Definition = DefinitionOperation OperationDefinition PositionInfo
7377
| DefinitionFragment FragmentDefinition PositionInfo

0 commit comments

Comments
 (0)