Methods
dispatch
- dispatch(requestSignature: string, state: StoreState, schemaKey?: undefined | string): void
-
Parameters
-
requestSignature: string
-
-
Optional schemaKey: undefined | string
Returns void
getItem
- getItem(requestSignature: string): undefined | object
-
Parameters
Returns undefined
|
object
getListeners
- getListeners(): function[]
middleware
- middleware(ctx: object): Promise<object>
-
Parameters
-
ctx: object
-
-
-
Optional errors?: string[]
-
Optional querySuffix?: undefined | string
-
requestConfig: RequestInit
-
Optional result?: R | null
-
variables: V
Returns Promise<object>
mountRequestSignature
- mountRequestSignature(schemaKey: string, variables: Dict): string
-
Parameters
-
schemaKey: string
-
variables: Dict
Returns string
optimisticUpdate
- optimisticUpdate(methodName: string, variables: Dict, setter: function): void
-
Parameters
-
methodName: string
-
variables: Dict
-
setter: function
Returns void
setItem
- setItem(requestSignature: string, state: StoreState, schemaKey: string, shouldDispatch?: boolean): void
-
Parameters
-
requestSignature: string
-
-
schemaKey: string
-
Default value shouldDispatch: boolean = true
Returns void
subscribe
-
Parameters
Returns unsubscribe
mounts a string with schemaKey and variables like 'postCount(foo:12,bar:1)'