diff options
| author | Eugen Wissner <belka@caraus.de> | 2020-07-08 08:16:14 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2020-07-08 08:17:55 +0200 |
| commit | c9e265f72c301a543091d58ec10863c66b279fd0 (patch) | |
| tree | ffe05b502fc20ce163130b7e3d383da19d76af6d /src/Language/GraphQL/AST/Document.hs | |
| parent | b2d473de8dac0f85f11a8f9985d1a9a4dfee03ab (diff) | |
| download | graphql-c9e265f72c301a543091d58ec10863c66b279fd0.tar.gz | |
Return parser error location in a list
An error can have multiple locations which are returned in a listt with
key "locations".
Diffstat (limited to 'src/Language/GraphQL/AST/Document.hs')
| -rw-r--r-- | src/Language/GraphQL/AST/Document.hs | 7 |
1 files changed, 7 insertions, 0 deletions
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. |
