function findValuesRemovedFromEnums(oldSchema, newSchema) {
  var oldTypeMap = oldSchema.getTypeMap();
  var newTypeMap = newSchema.getTypeMap();

  var valuesRemovedFromEnums = [];
  Object.keys(oldTypeMap).forEach(function (typeName) {
    var oldType = oldTypeMap[typeName];
    var newType = newTypeMap[typeName];
    if (!(oldType instanceof _definition.GraphQLEnumType) || !(newType instanceof _definition.GraphQLEnumType)) {
      return;
    }
    var valuesInNewEnum = Object.create(null);
    newType.getValues().forEach(function (value) {
      valuesInNewEnum[value.name] = true;
    });
    oldType.getValues().forEach(function (value) {
      if (!valuesInNewEnum[value.name]) {
        valuesRemovedFromEnums.push({
          type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM,
          description: value.name + ' was removed from enum type ' + typeName + '.'
        });
      }
    });
  });
  return valuesRemovedFromEnums;
}
/**
 * Given two schemas, returns an Array containing descriptions of any breaking
 * changes in the newSchema related to removing values from an enum type.
 */
Given two schemas, returns an Array containing descriptions of any breaking
changes in the newSchema related to removing values from an enum type.
Given two schemas returns an Array containing descriptions of any breaking changes in the newSchema related to removing values from an enum type .
function findValuesRemovedFromEnums(oldSchema, newSchema) {
  var oldTypeMap = oldSchema.getTypeMap();
  var newTypeMap = newSchema.getTypeMap();
  var valuesRemovedFromEnums = [];
  Object.keys(oldTypeMap).forEach(function (typeName) {
    var oldType = oldTypeMap[typeName];
    var newType = newTypeMap[typeName];
    if (!(oldType instanceof _definition.GraphQLEnumType) || !(newType instanceof _definition.GraphQLEnumType)) {
      return;
    }
    var valuesInNewEnum = Object.create(null);
    newType.getValues().forEach(function (value) {
      valuesInNewEnum[value.name] = true;
    });
    oldType.getValues().forEach(function (value) {
      if (!valuesInNewEnum[value.name]) {
        valuesRemovedFromEnums.push({
          type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM,
          description: value.name + ' was removed from enum type ' + typeName + '.'
        });
      }
    });
  });
  return valuesRemovedFromEnums;
}
function findValuesRemovedFromEnums ( oldSchema , newSchema ) { var oldTypeMap = oldSchema . getTypeMap ( ) ; var newTypeMap = newSchema . getTypeMap ( ) ; var valuesRemovedFromEnums = [ ] ; Object . keys ( oldTypeMap ) . forEach ( function ( typeName ) { var oldType = oldTypeMap [ typeName ] ; var newType = newTypeMap [ typeName ] ; if ( ! ( oldType instanceof _definition . GraphQLEnumType ) || ! ( newType instanceof _definition . GraphQLEnumType ) ) { return ; } var valuesInNewEnum = Object . create ( null ) ; newType . getValues ( ) . forEach ( function ( value ) { valuesInNewEnum [ value . name ] = true ; } ) ; oldType . getValues ( ) . forEach ( function ( value ) { if ( ! valuesInNewEnum [ value . name ] ) { valuesRemovedFromEnums . push ( { type : BreakingChangeType . VALUE_REMOVED_FROM_ENUM , description : value . name + ' was removed from enum type ' + typeName + '.' } ) ; } } ) ; } ) ; return valuesRemovedFromEnums ; }
Given two schemas, returns an Array containing descriptions of any breaking
 changes in the newSchema related to removing values from an enum type.
Given two schemas returns an Array containing descriptions of any breaking changes in the newSchema related to removing values from an enum type .