"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var change_1 = require("./change");
function typeRemoved(type) {
    return {
        criticality: {
            level: change_1.CriticalityLevel.Breaking,
        },
        message: "Type '" + type.name + "' was removed",
        path: type.name,
    };
}
exports.typeRemoved = typeRemoved;
function typeAdded(type) {
    return {
        criticality: {
            level: change_1.CriticalityLevel.NonBreaking,
        },
        message: "Type '" + type.name + "' was added",
        path: type.name,
    };
}
exports.typeAdded = typeAdded;
function typeKindChanged(oldType, newType) {
    return {
        criticality: {
            level: change_1.CriticalityLevel.Breaking,
            reason: "Changing the kind of a type is a breaking change because it can cause existing queries to error. For example, turning an object type to a scalar type would break queries that define a selection set for this type.",
        },
        message: "'" + oldType.name + "' kind changed from '" + oldType.astNode.kind + "' to '" + newType.astNode.kind + "'",
        path: oldType.name,
    };
}
exports.typeKindChanged = typeKindChanged;
function typeDescriptionChanged(oldType, newType) {
    return {
        criticality: {
            level: change_1.CriticalityLevel.NonBreaking,
        },
        message: "Description '" + oldType.description + "' on type '" + oldType.name + "' has changed to '" + newType.description + "'",
        path: oldType.name,
    };
}
exports.typeDescriptionChanged = typeDescriptionChanged;
//# sourceMappingURL=type.js.map