Skip to content

Commit 9dd4d08

Browse files
committed
cleaned up some comments
1 parent 74297ba commit 9dd4d08

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/analysis/buildTypeWeights.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,15 @@ function parseObjectFields(
8181
// The GraphQL type that this field represents
8282
let fieldType: GraphQLOutputType = fields[field].type;
8383
if (isNonNullType(fieldType)) fieldType = fieldType.ofType;
84-
if (
85-
isScalarType(fieldType) // ||
86-
) {
84+
if (isScalarType(fieldType)) {
8785
result.fields[field] = {
8886
weight: typeWeights.scalar,
8987
};
9088
} else if (
9189
isInterfaceType(fieldType) ||
9290
isUnionType(fieldType) ||
9391
isEnumType(fieldType) ||
94-
isObjectType(fieldType) // ||
92+
isObjectType(fieldType)
9593
) {
9694
result.fields[field] = {
9795
resolveTo: fieldType.name.toLocaleLowerCase(),
@@ -114,7 +112,6 @@ function parseObjectFields(
114112
fields[field].args.forEach((arg: GraphQLArgument) => {
115113
// If field has an argument matching one of the limiting keywords and resolves to a list
116114
// then the weight of the field should be dependent on both the weight of the resolved type and the limiting argument.
117-
// FIXME: Can nonnull wrap list types?
118115
if (KEYWORDS.includes(arg.name)) {
119116
// Get the type that comprises the list
120117
result.fields[field] = {

0 commit comments

Comments
 (0)