Skip to content

Documentation / @warp-drive/core / StoreSetupOptions

Interface: StoreSetupOptions

Defined in: core/src/index.ts:54

Options for setting up a Store instance with useRecommendedStore.

Properties

cache()

ts
cache: (capabilities) => Cache;

Defined in: core/src/index.ts:58

The Cache implementation to use

Parameters

capabilities

CacheCapabilitiesManager

Returns

Cache


CAUTION_MEGA_DANGER_ZONE_extensions?

ts
optional CAUTION_MEGA_DANGER_ZONE_extensions: CAUTION_MEGA_DANGER_ZONE_Extension[];

Defined in: core/src/index.ts:102

Extensions to use with resources, objects and arrays to provide custom behaviors and capabilities that are not described by Schema.

This feature should only be used during a transition period to support migrating towards schemas from existing Model and ModelFragments implementations.


derivations?

ts
optional derivations: Derivation[];

Defined in: core/src/index.ts:86

Derivations to use for derived fields.


handlers?

ts
optional handlers: Handler[];

Defined in: core/src/index.ts:72

The request handlers to use. Fetch will automatically be added to the end of the handler chain and CacheHandler will automatically be added as the cache handler.


hashFns?

ts
optional hashFns: HashFn[];

Defined in: core/src/index.ts:94

Hash Functions to use for embedded object identity and polymorphic type calculations


policy?

ts
optional policy: CachePolicy;

Defined in: core/src/index.ts:66

The Cache policy to use.

Defaults to DefaultCachePolicy configured to respect Expires, X-WarpDrive-Expires, and Cache-Control headers with a fallback to 30s soft expiration and 15m hard expiration.


schemas?

ts
optional schemas: (
  | PolarisResourceSchema
  | ObjectSchema)[];

Defined in: core/src/index.ts:78

Schemas describing the structure of your resource data.

See , and ObjectSchema for more information.


traits?

ts
optional traits: Trait[];

Defined in: core/src/index.ts:82

Traits to use with , | Resource Schemas


transformations?

ts
optional transformations: Transformation[];

Defined in: core/src/index.ts:90

Transformations to use for transforming fields.

Released under the MIT License.