Odoo GraphQL Subscription using Node, Express JS for Sample
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
537 B

4 months ago
import { newInvariantError } from "../../utilities/globals/index.js";
export function validateOperation(operation) {
var OPERATION_FIELDS = [
"query",
"operationName",
"variables",
"extensions",
"context",
];
for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {
var key = _a[_i];
if (OPERATION_FIELDS.indexOf(key) < 0) {
throw newInvariantError(43, key);
}
}
return operation;
}
//# sourceMappingURL=validateOperation.js.map