Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 1.46 KB

File metadata and controls

34 lines (20 loc) · 1.46 KB

applyBarrier

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.

Formulae

applyBarrier(operation, config)

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 to false. If true, then the operation will be marked as failed after the first fail.

applyBarrier(operations, config)

import { applyBarrier } from '@farfetched/core';

applyBarrier([operation1, operation2], config);

Operations is an array of Queries or Mutations to apply the Barrier to.

Config fields: