Interface StoreSetupOptions<T>
Defined in: warp-drive-packages/core/src/index.ts:70
Options for setting up a Store instance with useRecommendedStore.
Type Parameters
T
Properties
cache
cache: (capabilities) => T;Defined in: warp-drive-packages/core/src/index.ts:75
A constructor for the Cache implementation to use, receiving the store's CacheCapabilitiesManager when instantiated.
Constructs a new Cache instance for the store.
Parameters
capabilities
Returns
T
CAUTION_MEGA_DANGER_ZONE_extensions?
optional CAUTION_MEGA_DANGER_ZONE_extensions?: CAUTION_MEGA_DANGER_ZONE_Extension[];Defined in: warp-drive-packages/core/src/index.ts:137
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: warp-drive-packages/core/src/index.ts:121
Derivations to use for derived fields.
handlers?
optional handlers?:
| Handler[]
| ((store) => Handler[]);Defined in: warp-drive-packages/core/src/index.ts:107
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.
May also be given as a function that receives the Store instance and returns the handlers to use. This is useful when a handler needs access to the store (e.g. to look up its owner for injections) or when the set of handlers should be decided lazily (e.g. based on a feature flag service that may not be ready until after the store is constructed).
The function is invoked lazily, the first time the store's requestManager is accessed, and only once per store instance.
See the "Adding Stateful Handlers" section of useRecommendedStore for an example of using this callback to construct a handler that needs access to an Ember service.
hashFns?
optional hashFns?: HashFn[];Defined in: warp-drive-packages/core/src/index.ts:129
Hash Functions to use for embedded object identity and polymorphic type calculations
policy?
optional policy?: CachePolicy;Defined in: warp-drive-packages/core/src/index.ts:88
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: warp-drive-packages/core/src/index.ts:113
Schemas describing the structure of your resource data.
See , and ObjectSchema for more information.
traits?
optional traits?: Trait[];Defined in: warp-drive-packages/core/src/index.ts:117
Traits to use with , | Resource Schemas
transformations?
optional transformations?: Transformation[];Defined in: warp-drive-packages/core/src/index.ts:125
Transformations to use for transforming fields.