API reference > @kontsedal/olas-core > NetworkMode
NetworkMode type
How a query behaves with respect to the network reachability signal.
online(default) — pause fetches whilenavigator.onLineisfalse; automatically resume when reconnect fires (viasubscribeReconnect). Inflight fetches are NOT aborted on offline; abindEntry/acquirethat lands while offline simply defers the initial fetch. The deferred entry reportsisPaused: trueuntil reconnect. A fetch requested while offline does supersede one already in flight, as a request made online does, so the older response never lands. -always— never gate on connectivity; fetcher runs whenever requested. Useful for queries againstlocalhost/ IPC / a service worker that doesn't surface throughnavigator.onLine. -offlineFirst— start the fetch regardless; if it rejects with a network-shaped error (afetchTypeError;AbortErrorexcluded) whilenavigator.onLineisfalse, park the entry (isPaused: true, status staysidle/ last-success) and retry on reconnect rather than surfacing the error. Matches TanStack'sofflineFirstpolicy for app-shell-first PWAs.
Signature:
typescript
type NetworkMode = 'online' | 'always' | 'offlineFirst';