Skip to content

schema coordinates spec wording edits #4440

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

Open
wants to merge 5 commits into
base: schema-coordinates
Choose a base branch
from
Open
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
14 changes: 7 additions & 7 deletions src/utilities/resolveSchemaCoordinate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function resolveTypeCoordinate(
const typeName = schemaCoordinate.name.value;
const type = schema.getType(typeName);

// 2. Return the type in the {schema} named {typeName}, or {null} if no such type exists.
// 2. Return the type in the {schema} named {typeName} if it exists.
if (type == null) {
return;
}
Expand Down Expand Up @@ -152,7 +152,7 @@ function resolveMemberCoordinate(
const enumValueName = schemaCoordinate.memberName.value;
const enumValue = type.getValue(enumValueName);

// 2. Return the enum value of {type} named {enumValueName}, or {null} if no such value exists.
// 2. Return the enum value of {type} named {enumValueName} if it exists.
if (enumValue == null) {
return;
}
Expand All @@ -166,7 +166,7 @@ function resolveMemberCoordinate(
const inputFieldName = schemaCoordinate.memberName.value;
const inputField = type.getFields()[inputFieldName];

// 2. Return the input field of {type} named {inputFieldName}, or {null} if no such input field exists.
// 2. Return the input field of {type} named {inputFieldName} if it exists.
if (inputField == null) {
return;
}
Expand All @@ -179,7 +179,7 @@ function resolveMemberCoordinate(
const fieldName = schemaCoordinate.memberName.value;
const field = schema.getField(type, fieldName);

// 2. Return the field of {type} named {fieldName}, or {null} if no such field exists.
// 2. Return the field of {type} named {fieldName} if it exists.
if (field == null) {
return;
}
Expand Down Expand Up @@ -229,7 +229,7 @@ function resolveArgumentCoordinate(
(arg) => arg.name === fieldArgumentName,
);

// 8. Return the argument of {field} named {fieldArgumentName}, or {null} if no such argument exists.
// 8. Return the argument of {field} named {fieldArgumentName} if it exists.
if (fieldArgument == null) {
return;
}
Expand All @@ -248,7 +248,7 @@ function resolveDirectiveCoordinate(
const directiveName = schemaCoordinate.name.value;
const directive = schema.getDirective(directiveName);

// 2. Return the directive in the {schema} named {directiveName}, or {null} if no such directive exists.
// 2. Return the directive in the {schema} named {directiveName} if it exists.
if (!directive) {
return;
}
Expand Down Expand Up @@ -283,7 +283,7 @@ function resolveDirectiveArgumentCoordinate(
(arg) => arg.name === directiveArgumentName,
);

// 5. Return the argument of {directive} named {directiveArgumentName}, or {null} if no such argument exists.
// 5. Return the argument of {directive} named {directiveArgumentName} if it exists.
if (!directiveArgument) {
return;
}
Expand Down
Loading