From c9e265f72c301a543091d58ec10863c66b279fd0 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Wed, 8 Jul 2020 08:16:14 +0200 Subject: Return parser error location in a list An error can have multiple locations which are returned in a listt with key "locations". --- src/Language/GraphQL/AST/Document.hs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Language/GraphQL/AST/Document.hs') diff --git a/src/Language/GraphQL/AST/Document.hs b/src/Language/GraphQL/AST/Document.hs index 430e92a..ed473b7 100644 --- a/src/Language/GraphQL/AST/Document.hs +++ b/src/Language/GraphQL/AST/Document.hs @@ -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. -- cgit v1.2.3