Function: operationGraph()
ts
function operationGraph(operations): OperationNode[];Defined in: validate/dependencies.ts:334
The whole chain as a dependency graph, one node per operation in order. Use this instead of querying node by node: it needs no ref lookup, addresses repeated operations unambiguously by position, and is what the validator itself runs on.
Parameters
| Parameter | Type |
|---|---|
operations | readonly CdnOperation[] |
Returns
See
https://uploadcare.com/docs/transformations/image/
Example
ts
// every modifier that never reaches a target
operationGraph(ops).filter(
(node) => isOperationModifier(node.operation) && node.dependents.length === 0
)