diff options
| author | Eugen Wissner <belka@caraus.de> | 2020-09-16 09:12:49 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2020-09-16 09:12:49 +0200 |
| commit | 6e644c5b4b3a8284ed0a1f0a84fef775f70a68d6 (patch) | |
| tree | 56cac7b46b3621c8621e5f8026e275c3b464394d /src/Language/GraphQL/Validate/Validation.hs | |
| parent | 4c10ce92041dc73a95aeb64aca241dd937ffaa5c (diff) | |
| download | graphql-6e644c5b4b3a8284ed0a1f0a84fef775f70a68d6.tar.gz | |
Move path to the execution error
Since it isn't possible to get a path during validation, without
executing the query.
Diffstat (limited to 'src/Language/GraphQL/Validate/Validation.hs')
| -rw-r--r-- | src/Language/GraphQL/Validate/Validation.hs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/Language/GraphQL/Validate/Validation.hs b/src/Language/GraphQL/Validate/Validation.hs index 4432478..0cc39f7 100644 --- a/src/Language/GraphQL/Validate/Validation.hs +++ b/src/Language/GraphQL/Validate/Validation.hs @@ -5,7 +5,6 @@ -- | Definitions used by the validation rules and the validator itself. module Language.GraphQL.Validate.Validation ( Error(..) - , Path(..) , Rule(..) , RuleT , Validation(..) @@ -14,25 +13,14 @@ module Language.GraphQL.Validate.Validation import Control.Monad.Trans.Reader (ReaderT) import Data.HashMap.Strict (HashMap) import Data.Sequence (Seq) -import Data.Text (Text) import Language.GraphQL.AST.Document import Language.GraphQL.Type.Schema (Schema) import qualified Language.GraphQL.Type.Schema as Schema --- | If an error can be associated to a particular field in the GraphQL result, --- it must contain an entry with the key path that details the path of the --- response field which experienced the error. This allows clients to identify --- whether a null result is intentional or caused by a runtime error. -data Path - = Segment Text -- ^ Field name. - | Index Int -- ^ List index if a field returned a list. - deriving (Eq, Show) - -- | Validation error. data Error = Error { message :: String , locations :: [Location] - , path :: [Path] } deriving (Eq, Show) -- | Validation rule context. |
