Skip to content
On this page

concurrency since v0.12

Applies concurrency settings to the Query or Mutation.


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

concurrency(operation, config);

Operation could be a Query or a Mutation.

Config fields:

  • strategy?: available strategies:
    • TAKE_EVERY (default) — every request will be executed
    • TAKE_LATEST — the latest request will be executed, all previous requests will be aborted
    • TAKE_FIRST — the first request will be executed, all subsequent requests will be skipped
  • abortAll?: Event after calling which all requests will be aborted immediately


Released under the MIT License.