# @atlaskit/feature-gate-polling-provider

> Provider that has caching and polling support when getting values from feature-flag-service. To be used with the @atlaskit/feature-gate-js-client

Latest version **2.0.1** (published 2026-09-24) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @atlaskit/feature-gate-polling-provider
pnpm add @atlaskit/feature-gate-polling-provider
yarn add @atlaskit/feature-gate-polling-provider
bun add @atlaskit/feature-gate-polling-provider
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2026-09-24 |
| First published | 2024-10-01 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 157.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Atlassian Pty Ltd |
| Maintainers | atlassianartifactteam |

## Links

- npm: https://www.npmjs.com/package/@atlaskit/feature-gate-polling-provider
- Repository: https://bitbucket.org/atlassian/atlassian-frontend-monorepo
- Homepage: https://bitbucket.org/atlassian/atlassian-frontend-monorepo#readme
- Issues: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/issues
- npm.io page: https://npm.io/package/@atlaskit/feature-gate-polling-provider

## Dependencies (4)

- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.0.0
- [bind-event-listener](https://npm.io/package/bind-event-listener.md) ^3.0.0
- [@atlaskit/feature-gate-fetcher](https://npm.io/package/@atlaskit/feature-gate-fetcher.md) ^1.0.0
- [@atlaskit/feature-gate-js-client](https://npm.io/package/@atlaskit/feature-gate-js-client.md) ^7.0.0

## Recent versions

- 2.0.1 (latest) — 2026-09-24
- 2.0.0 — 2026-06-16
- 1.2.0 — 2026-05-13
- 1.1.17 — 2025-03-24
- 1.1.16 — 2025-02-28
- 1.1.15 — 2025-02-28
- 1.1.14 — 2025-02-25
- 1.1.13 — 2025-02-25
- 1.1.12 — 2025-02-24
- 1.1.11 — 2025-02-24
- 1.1.10 — 2025-02-21
- 1.1.9 — 2025-02-18
- 1.1.7 — 2025-02-14
- 1.1.6 — 2025-01-31
- 1.1.5 — 2025-01-03
- … 10 more at https://npm.io/package/@atlaskit/feature-gate-polling-provider/versions

## README

# PollingProvider

Provider that has caching and polling support when getting values from feature-flag-service. To be
used with the @atlaskit/feature-gate-js-client

## Usage

Used when initializing the feature-gate-js-client using `initializeWithProvider`.

```javascript
import FeatureGates, { FeatureGateEnvironment, FeatureGateProducts } from '@atlaskit/feature-gate-js-client';
import PollingProvider from '@atlaskit/feature-gate-polling-provider';

try {
  await FeatureGates.initializeWithProvider(
    clientOptions,
	new PollingProvider({
		// This is an fx3 api key used to fetch the feature flag values.
        // Supported keys found at go/fx3/resources/api-keys
		apiKey: 'client-test',
		// [Optional] Default is 2_000ms
		// This is the fetch timeout used for initial page load requests to feature-flag-service to get values to bootstrap the client.
		// The higher this value the longer your application will need to wait to render if you block on client initialization
		// Too low and your application will be more likely to fallback on default values
		initialFetchTimeout: 1000;
		// [Optional] Default is 300_000ms = 5 min
		// The interval at which polling requests will be made to feature-flag-service to get current values
		// Note: minimum polling interval in prod is 60_000ms = 1 min. minimum polling interval in non prod is 1_000ms = 1 second
		pollingInterval?: 1000,
		// [Optional] Default is false
		// This is a boolean to indicate whether to use the `gateway/api` url for the request to feature flag service.
		// Note that this option takes precendence over the environment and perimeter options in building the url.
		// To be used for applications with strict cross-origin policies, as it will keep all requests to the same origin.
		useGatewayUrl: true,
	})
    identifiers,
    customAttributes
  );
} catch (err) {
  console.error("Failed to initialize FeatureGates client.", err);
}
```

Detailed docs and example usage can be found
[here](https://atlaskit.atlassian.com/packages/measurement/feature-gate-polling-provider).

---
_Source: https://npm.io/package/@atlaskit/feature-gate-polling-provider · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
