We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93a3bda commit ab93bf4Copy full SHA for ab93bf4
src/utilities/findBreakingChanges.js
@@ -8,6 +8,7 @@
8
*/
9
10
import find from '../polyfills/find';
11
+import inspect from '../jsutils/inspect';
12
import {
13
type GraphQLNamedType,
14
type GraphQLFieldMap,
@@ -292,7 +293,10 @@ function typeKindName(type: GraphQLNamedType): string {
292
293
if (isInputObjectType(type)) {
294
return 'an Input type';
295
}
- throw new TypeError('Unknown type ' + type.constructor.name);
296
+
297
+ // Not reachable. All possible named types have been considered.
298
+ /* istanbul ignore next */
299
+ throw new TypeError(`Unexpected type: ${inspect((type: empty))}.`);
300
301
302
function findFieldsThatChangedTypeOnObjectOrInterfaceTypes(
0 commit comments