summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL/Execute/Internal.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Language/GraphQL/Execute/Internal.hs')
-rw-r--r--src/Language/GraphQL/Execute/Internal.hs14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/Language/GraphQL/Execute/Internal.hs b/src/Language/GraphQL/Execute/Internal.hs
index 7e4e4a9..046db45 100644
--- a/src/Language/GraphQL/Execute/Internal.hs
+++ b/src/Language/GraphQL/Execute/Internal.hs
@@ -15,13 +15,8 @@ import Control.Monad.Trans.State (modify)
import Control.Monad.Catch (MonadCatch)
import Data.Sequence ((|>))
import qualified Data.Text as Text
-import Language.GraphQL.Execute.Coerce
-import Language.GraphQL.Error
- ( CollectErrsT
- , Error(..)
- , Resolution(..)
- , Response(..)
- )
+import qualified Language.GraphQL.AST as Full
+import Language.GraphQL.Error (CollectErrsT, Error(..), Resolution(..))
import Prelude hiding (null)
addError :: MonadCatch m => forall a. a -> Error -> CollectErrsT m a
@@ -32,6 +27,5 @@ addError returnValue error' = modify appender >> pure returnValue
{ errors = errors |> error'
}
-singleError :: Serialize b => forall a. String -> Either a (Response b)
-singleError message =
- Right $ Response null $ pure $ Error (Text.pack message) [] []
+singleError :: [Full.Location] -> String -> Error
+singleError errorLocations message = Error (Text.pack message) errorLocations []