Return parser error location in a list

An error can have multiple locations which are returned in a listt with
key "locations".
This commit is contained in:
2020-07-08 08:16:14 +02:00
parent b2d473de8d
commit c9e265f72c
6 changed files with 40 additions and 20 deletions

View File

@ -19,6 +19,7 @@ module Language.GraphQL.AST.Document
, FragmentDefinition(..)
, ImplementsInterfaces(..)
, InputValueDefinition(..)
, Location(..)
, Name
, NamedType
, NonNullType(..)
@ -55,6 +56,12 @@ import Language.GraphQL.AST.DirectiveLocation
-- | Name.
type Name = Text
-- | Error location, line and column.
data Location = Location
{ line :: Word
, column :: Word
} deriving (Eq, Show)
-- ** Document
-- | GraphQL document.