Skip to content

Commit 28f0bf2

Browse files
committed
Add fragment variables to parseLiteral
1 parent e614f8f commit 28f0bf2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utilities/valueFromAST.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ export function valueFromAST(
167167
// no value is returned.
168168
let result;
169169
try {
170-
result = type.parseLiteral(valueNode, variables);
170+
result = type.parseLiteral(
171+
valueNode,
172+
fragmentVariables ? { ...variables, ...fragmentVariables } : variables,
173+
);
171174
} catch (_error) {
172175
return; // Invalid: intentionally return no value.
173176
}

0 commit comments

Comments
 (0)