import { newInvariantError } from "@apollo/client/utilities/invariant";
export 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 newInvariantError(49, key);
        }
    }
    return operation;
}
//# sourceMappingURL=validateOperation.js.map
