summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL/Execute
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2020-09-05 10:00:58 +0200
committerEugen Wissner <belka@caraus.de>2020-09-05 10:00:58 +0200
commitd327d9d1ce9670e51b7eef7a4272aaf3b6290228 (patch)
treeca27d933d3fb60a1dacd29378beee51754a12825 /src/Language/GraphQL/Execute
parent14ed2098285776690bd8fea4209560bf3dba9e74 (diff)
downloadgraphql-d327d9d1ce9670e51b7eef7a4272aaf3b6290228.tar.gz
Validate fragment spread type existence
Diffstat (limited to 'src/Language/GraphQL/Execute')
-rw-r--r--src/Language/GraphQL/Execute/Transform.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Language/GraphQL/Execute/Transform.hs b/src/Language/GraphQL/Execute/Transform.hs
index deeb5b9..b438bdf 100644
--- a/src/Language/GraphQL/Execute/Transform.hs
+++ b/src/Language/GraphQL/Execute/Transform.hs
@@ -288,7 +288,7 @@ operation operationDefinition replacement
selection
:: Full.Selection
-> State (Replacement m) (Either (Seq (Selection m)) (Selection m))
-selection (Full.Field alias name arguments' directives' selections) =
+selection (Full.Field alias name arguments' directives' selections _) =
maybe (Left mempty) (Right . SelectionField) <$> do
fieldArguments <- foldM go HashMap.empty arguments'
fieldSelections <- appendSelection selections
@@ -314,7 +314,7 @@ selection (Full.FragmentSpread name directives' _) =
Just fragment -> lift $ pure $ fragment <$ spreadDirectives
_ -> lift $ pure Nothing
| otherwise -> lift $ pure Nothing
-selection (Full.InlineFragment type' directives' selections) = do
+selection (Full.InlineFragment type' directives' selections _) = do
fragmentDirectives <- Definition.selection <$> directives directives'
case fragmentDirectives of
Nothing -> pure $ Left mempty