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
698 B

4 months ago
import { getOperationName } from "../../utilities/index.js";
export function transformOperation(operation) {
var transformedOperation = {
variables: operation.variables || {},
extensions: operation.extensions || {},
operationName: operation.operationName,
query: operation.query,
};
// Best guess at an operation name
if (!transformedOperation.operationName) {
transformedOperation.operationName =
typeof transformedOperation.query !== "string" ?
getOperationName(transformedOperation.query) || undefined
: "";
}
return transformedOperation;
}
//# sourceMappingURL=transformOperation.js.map