"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateOperation = validateOperation;
const invariant_1 = require("@apollo/client/utilities/invariant");
function validateOperation(operation) {
    const OPERATION_FIELDS = [
        "query",
        "operationName",
        "variables",
        "extensions",
        "context",
    ];
    for (let key of Object.keys(operation)) {
        if (OPERATION_FIELDS.indexOf(key) < 0) {
            throw (0, invariant_1.newInvariantError)(49, key);
        }
    }
    return operation;
}
//# sourceMappingURL=validateOperation.cjs.map
