import { newInvariantError } from "@apollo/client/utilities/invariant";
export function validateOperation(operation) {
    const OPERATION_FIELDS = [
        "query",
        "operationName",
        "operationType",
        "variables",
        "extensions",
        "context",
    ];
    for (let key of Object.keys(operation)) {
        if (OPERATION_FIELDS.indexOf(key) < 0) {
            throw newInvariantError(57, key);
        }
    }
    return operation;
}
//# sourceMappingURL=validateOperation.js.map
