summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL/Error.hs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2024-04-04 18:51:23 +0200
committerEugen Wissner <belka@caraus.de>2024-04-04 18:51:58 +0200
commite731c7db07f2eacaecd64ea28426ad87bcef6ca8 (patch)
treea40f50b90e8d31aea6aa216a5ce22dfda81e3f8e /src/Language/GraphQL/Error.hs
parent303cf18d7713c433d3c5863a382e8b9a288c9805 (diff)
downloadgraphql-e731c7db07f2eacaecd64ea28426ad87bcef6ca8.tar.gz
Remove deprecated symbols from the Error module
Diffstat (limited to 'src/Language/GraphQL/Error.hs')
-rw-r--r--src/Language/GraphQL/Error.hs35
1 files changed, 2 insertions, 33 deletions
diff --git a/src/Language/GraphQL/Error.hs b/src/Language/GraphQL/Error.hs
index 87ee702..4a406d0 100644
--- a/src/Language/GraphQL/Error.hs
+++ b/src/Language/GraphQL/Error.hs
@@ -8,28 +8,22 @@
-- | Error handling.
module Language.GraphQL.Error
- ( CollectErrsT
- , Error(..)
+ ( Error(..)
, Path(..)
- , Resolution(..)
, ResolverException(..)
, Response(..)
, ResponseEventStream
, parseError
- , runCollectErrs
) where
import Conduit
import Control.Exception (Exception(..))
-import Control.Monad.Trans.State (StateT, runStateT)
-import Data.HashMap.Strict (HashMap)
import Data.Sequence (Seq(..), (|>))
import qualified Data.Sequence as Seq
import Data.Text (Text)
import qualified Data.Text as Text
-import Language.GraphQL.AST (Location(..), Name)
+import Language.GraphQL.AST (Location(..))
import Language.GraphQL.Execute.Coerce
-import qualified Language.GraphQL.Type.Schema as Schema
import Prelude hiding (null)
import Text.Megaparsec
( ParseErrorBundle(..)
@@ -97,28 +91,3 @@ instance Show ResolverException where
show (ResolverException e) = show e
instance Exception ResolverException
-
--- * Deprecated
-
-{-# DEPRECATED runCollectErrs "runCollectErrs was part of the old executor and isn't used anymore" #-}
--- | Runs the given query computation, but collects the errors into an error
--- list, which is then sent back with the data.
-runCollectErrs :: (Monad m, Serialize a)
- => HashMap Name (Schema.Type m)
- -> CollectErrsT m a
- -> m (Response a)
-runCollectErrs types' res = do
- (dat, Resolution{..}) <- runStateT res
- $ Resolution{ errors = Seq.empty, types = types' }
- pure $ Response dat errors
-
-{-# DEPRECATED Resolution "Resolution was part of the old executor and isn't used anymore" #-}
--- | Executor context.
-data Resolution m = Resolution
- { errors :: Seq Error
- , types :: HashMap Name (Schema.Type m)
- }
-
-{-# DEPRECATED CollectErrsT "CollectErrsT was part of the old executor and isn't used anymore" #-}
--- | A wrapper to pass error messages around.
-type CollectErrsT m = StateT (Resolution m) m