summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL/Execute/Coerce.hs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2020-05-23 06:46:21 +0200
committerEugen Wissner <belka@caraus.de>2020-05-23 21:49:57 +0200
commit7cd48217187911855cd2ad473e58d11df0c69d48 (patch)
tree4fe56da3d1c209ea070e75f10aa21cb00eada8f4 /src/Language/GraphQL/Execute/Coerce.hs
parent26cc53ce0678d48bf7d5550df65171e6bf5288d2 (diff)
downloadgraphql-7cd48217187911855cd2ad473e58d11df0c69d48.tar.gz
Don't fail on invalid fragments and variables
Diffstat (limited to 'src/Language/GraphQL/Execute/Coerce.hs')
-rw-r--r--src/Language/GraphQL/Execute/Coerce.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Language/GraphQL/Execute/Coerce.hs b/src/Language/GraphQL/Execute/Coerce.hs
index ead19dc..6997945 100644
--- a/src/Language/GraphQL/Execute/Coerce.hs
+++ b/src/Language/GraphQL/Execute/Coerce.hs
@@ -4,6 +4,7 @@
module Language.GraphQL.Execute.Coerce
( VariableValue(..)
, coerceInputLiterals
+ , isNonNullInputType
) where
import qualified Data.Aeson as Aeson
@@ -148,6 +149,7 @@ coerceInputLiterals variableTypes variableValues =
. Text.Builder.toLazyText
. Text.Builder.decimal
+-- | Checks whether the given input type is a non-null type.
isNonNullInputType :: InputType -> Bool
isNonNullInputType (NonNullScalarInputType _) = True
isNonNullInputType (NonNullEnumInputType _) = True