Applies the Barrier to the Query or Mutation. After operation start it checks the Barrier .$active status and postpones the execution if the Barrier is active. After the Barrier is deactivated, it resumes the execution of the operation.
import { applyBarrier } from '@farfetched/core';
applyBarrier(operation, config);Operation could be a Query or a Mutation to apply the Barrier to.
Config fields:
barrier- Barrier to apply.suppressIntermediateFailures?- boolean whether to suppress intermediate failures or not, defaults tofalse. Iftrue, then the operation will be marked as failed after the first fail.
import { applyBarrier } from '@farfetched/core';
applyBarrier([operation1, operation2], config);Operations is an array of Queries or Mutations to apply the Barrier to.
Config fields:
- same as previous formula.