Skip to content

Commit 7a5e733

Browse files
authored
Adapt some comments after serialization of enums changed (#2450)
1 parent 2d1d436 commit 7a5e733

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/utilities/coerceInputValue.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ function coerceInputValueImpl(
151151
if (isLeafType(type)) {
152152
let parseResult;
153153

154-
// Scalars determine if a input value is valid via parseValue(), which can
155-
// throw to indicate failure. If it throws, maintain a reference to
156-
// the original error.
154+
// Scalars and Enums determine if a input value is valid via parseValue(),
155+
// which can throw to indicate failure. If it throws, maintain a reference
156+
// to the original error.
157157
try {
158158
parseResult = type.parseValue(inputValue);
159159
} catch (error) {

src/utilities/valueFromAST.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export function valueFromAST(
132132
}
133133

134134
if (isLeafType(type)) {
135-
// Scalars fulfill parsing a literal value via parseLiteral().
135+
// Scalars and Enums fulfill parsing a literal value via parseLiteral().
136136
// Invalid values represent a failure to parse correctly, in which case
137137
// no value is returned.
138138
let result;

src/validation/rules/ValuesOfCorrectTypeRule.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ function isValidValueNode(context: ValidationContext, node: ValueNode): void {
125125
return;
126126
}
127127

128-
// Scalars determine if a literal value is valid via parseLiteral() which
129-
// may throw or return an invalid value to indicate failure.
128+
// Scalars and Enums determine if a literal value is valid via parseLiteral(),
129+
// which may throw or return an invalid value to indicate failure.
130130
try {
131131
const parseResult = type.parseLiteral(node, undefined /* variables */);
132132
if (parseResult === undefined) {

0 commit comments

Comments
 (0)