Skip to content

Commit

Permalink
Add fragment variables to parseLiteral
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Sep 12, 2024
1 parent e614f8f commit 28f0bf2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utilities/valueFromAST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ export function valueFromAST(
// no value is returned.
let result;
try {
result = type.parseLiteral(valueNode, variables);
result = type.parseLiteral(
valueNode,
fragmentVariables ? { ...variables, ...fragmentVariables } : variables,
);
} catch (_error) {
return; // Invalid: intentionally return no value.
}
Expand Down

0 comments on commit 28f0bf2

Please sign in to comment.