forked from OSS/graphql
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:
@ -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.
|
||||
|
Reference in New Issue
Block a user