"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var change_1 = require("./change");
function schemaQueryTypeChanged(oldSchema, newSchema) {
    var oldName = (oldSchema.getQueryType() || {}).name || 'unknown';
    var newName = (newSchema.getQueryType() || {}).name || 'unknown';
    return {
        criticality: {
            level: change_1.CriticalityLevel.Breaking,
        },
        message: "Schema query root has changed from '" + oldName + "' to '" + newName + "'",
    };
}
exports.schemaQueryTypeChanged = schemaQueryTypeChanged;
function schemaMutationTypeChanged(oldSchema, newSchema) {
    var oldName = (oldSchema.getMutationType() || {}).name || 'unknown';
    var newName = (newSchema.getMutationType() || {}).name || 'unknown';
    return {
        criticality: {
            level: change_1.CriticalityLevel.Breaking,
        },
        message: "Schema mutation root has changed from '" + oldName + "' to '" + newName + "'",
    };
}
exports.schemaMutationTypeChanged = schemaMutationTypeChanged;
function schemaSubscriptionTypeChanged(oldSchema, newSchema) {
    var oldName = (oldSchema.getSubscriptionType() || {}).name || 'unknown';
    var newName = (newSchema.getSubscriptionType() || {}).name || 'unknown';
    return {
        criticality: {
            level: change_1.CriticalityLevel.Breaking,
        },
        message: "Schema subscription root has changed from '" + oldName + "' to '" + newName + "'",
    };
}
exports.schemaSubscriptionTypeChanged = schemaSubscriptionTypeChanged;
//# sourceMappingURL=schema.js.map