Skip to content

Commit 42d1f4d

Browse files
authored
schema coordinates spec wording edits (#4440)
Update comments per graphql/graphql-spec@5ac68a0
1 parent 1f70a93 commit 42d1f4d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/utilities/resolveSchemaCoordinate.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function resolveTypeCoordinate(
109109
const typeName = schemaCoordinate.name.value;
110110
const type = schema.getType(typeName);
111111

112-
// 2. Return the type in the {schema} named {typeName}, or {null} if no such type exists.
112+
// 2. Return the type in the {schema} named {typeName} if it exists.
113113
if (type == null) {
114114
return;
115115
}
@@ -152,7 +152,7 @@ function resolveMemberCoordinate(
152152
const enumValueName = schemaCoordinate.memberName.value;
153153
const enumValue = type.getValue(enumValueName);
154154

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

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

182-
// 2. Return the field of {type} named {fieldName}, or {null} if no such field exists.
182+
// 2. Return the field of {type} named {fieldName} if it exists.
183183
if (field == null) {
184184
return;
185185
}
@@ -229,7 +229,7 @@ function resolveArgumentCoordinate(
229229
(arg) => arg.name === fieldArgumentName,
230230
);
231231

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

251-
// 2. Return the directive in the {schema} named {directiveName}, or {null} if no such directive exists.
251+
// 2. Return the directive in the {schema} named {directiveName} if it exists.
252252
if (!directive) {
253253
return;
254254
}
@@ -283,7 +283,7 @@ function resolveDirectiveArgumentCoordinate(
283283
(arg) => arg.name === directiveArgumentName,
284284
);
285285

286-
// 5. Return the argument of {directive} named {directiveArgumentName}, or {null} if no such argument exists.
286+
// 5. Return the argument of {directive} named {directiveArgumentName} if it exists.
287287
if (!directiveArgument) {
288288
return;
289289
}

0 commit comments

Comments
 (0)