Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt some comments after serialization of enums changed #2450

Merged
merged 1 commit into from
Feb 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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