Skip to content

Commit

Permalink
Adapt some comments after serialization of enums changed (#2450)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito authored Feb 9, 2020
1 parent 2d1d436 commit 7a5e733
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/utilities/coerceInputValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ function coerceInputValueImpl(
if (isLeafType(type)) {
let parseResult;

// Scalars determine if a input value is valid via parseValue(), which can
// throw to indicate failure. If it throws, maintain a reference to
// the original error.
// Scalars and Enums determine if a input value is valid via parseValue(),
// which can throw to indicate failure. If it throws, maintain a reference
// to the original error.
try {
parseResult = type.parseValue(inputValue);
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/valueFromAST.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export function valueFromAST(
}

if (isLeafType(type)) {
// Scalars fulfill parsing a literal value via parseLiteral().
// Scalars and Enums fulfill parsing a literal value via parseLiteral().
// Invalid values represent a failure to parse correctly, in which case
// no value is returned.
let result;
Expand Down
4 changes: 2 additions & 2 deletions src/validation/rules/ValuesOfCorrectTypeRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ function isValidValueNode(context: ValidationContext, node: ValueNode): void {
return;
}

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

0 comments on commit 7a5e733

Please sign in to comment.