Skip to content

Commit 9f35269

Browse files
authored
Merge pull request #87 from oslabs-beta/em/mutations
Mutations
2 parents 0c4801e + 8e073bb commit 9f35269

File tree

3 files changed

+383
-80
lines changed

3 files changed

+383
-80
lines changed

src/analysis/buildTypeWeights.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ import {
1313
isObjectType,
1414
isScalarType,
1515
isUnionType,
16+
isInputType,
1617
Kind,
1718
ValueNode,
1819
GraphQLUnionType,
1920
GraphQLFieldMap,
21+
isInputObjectType,
2022
} from 'graphql';
2123
import { ObjMap } from 'graphql/jsutils/ObjMap';
2224
import { GraphQLSchema } from 'graphql/type/schema';
@@ -351,7 +353,7 @@ function parseTypes(schema: GraphQLSchema, typeWeights: TypeWeightSet): TypeWeig
351353
};
352354
} else if (isUnionType(currentType)) {
353355
unions.push(currentType);
354-
} else if (!isScalarType(currentType)) {
356+
} else if (!isScalarType(currentType) && !isInputObjectType(currentType)) {
355357
throw new Error(`ERROR: buildTypeWeight: Unsupported type: ${currentType}`);
356358
}
357359
}

0 commit comments

Comments
 (0)