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()
cache: (capabilities) => Cache;
Defined in: core/src/index.ts:58
The Cache implementation to use
Parameters
capabilities
Returns
CAUTION_MEGA_DANGER_ZONE_extensions?
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?
optional derivations: Derivation[];
Defined in: core/src/index.ts:86
Derivations to use for derived fields.
handlers?
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?
optional hashFns: HashFn[];
Defined in: core/src/index.ts:94
Hash Functions to use for embedded object identity and polymorphic type calculations
policy?
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?
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?
optional traits: Trait[];
Defined in: core/src/index.ts:82
Traits to use with , | Resource Schemas
transformations?
optional transformations: Transformation[];
Defined in: core/src/index.ts:90
Transformations to use for transforming fields.