{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Data.Morpheus.Error.Input
( typeViolation,
)
where
import Data.Morpheus.Types.Internal.AST
( GQLError,
TypeRef (..),
Value,
msg,
)
import Data.Semigroup ((<>))
typeViolation :: TypeRef -> Value s -> GQLError
typeViolation :: TypeRef -> Value s -> GQLError
typeViolation TypeRef
expected Value s
found =
GQLError
"Expected type "
GQLError -> GQLError -> GQLError
forall a. Semigroup a => a -> a -> a
<> TypeRef -> GQLError
forall a. Msg a => a -> GQLError
msg TypeRef
expected
GQLError -> GQLError -> GQLError
forall a. Semigroup a => a -> a -> a
<> GQLError
" found "
GQLError -> GQLError -> GQLError
forall a. Semigroup a => a -> a -> a
<> Value s -> GQLError
forall a. Msg a => a -> GQLError
msg Value s
found
GQLError -> GQLError -> GQLError
forall a. Semigroup a => a -> a -> a
<> GQLError
"."