extensionKindToTypeName function
Returns a user facing name for a given type extension node kind
Implementation
String extensionKindToTypeName(Kind kind) {
switch (kind) {
case Kind.ScalarTypeExtension:
return 'scalar';
case Kind.ObjectTypeExtension:
return 'object';
case Kind.InterfaceTypeExtension:
return 'interface';
case Kind.UnionTypeExtension:
return 'union';
case Kind.EnumTypeExtension:
return 'enum';
case Kind.InputObjectTypeExtension:
return 'input object';
default:
// istanbul ignore next (Not reachable.
// All possible types have been considered)
assert(false, 'Unexpected kind: $kind');
return '';
}
}