You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add unwrap to QueryActionCreatorResult and update LazyQueryTrigger (#1701)
* Add unwrap to QueryActionCreatorResult and update LazyQueryTrigger
* Add test for the return value of lazy query's trigger
* Fix types for lazy query :fingers_crossed:
* minor refactor, add test for positive case
* Use QueryResultSelectorResult instead of QuerySubState
* Update buildHooks test and type expectations for useLazyQuery unwrapping
* Update UseLazyQueryTrigger signature
* Remove extra unwrap and add queryString types
* remove import, fix test
Co-authored-by: Lenz Weber <[email protected]>
arg:unknown// Whatever argument was provided to the query
497
+
requestId:string// A string generated by RTK Query
498
+
subscriptionOptions:SubscriptionOptions// The values used for the query subscription
499
+
abort: () =>void// A method to cancel the query promise
500
+
unwrap: () =>Promise<T> // A method to unwrap the query call and provide the raw response/error
501
+
unsubscribe: () =>void// A method used to manually unsubscribe from the query results
502
+
refetch: () =>void// A method used to re-run the query. In most cases when using a lazy query, you will never use this and should prefer to call the trigger again.
503
+
updateSubscriptionOptions: (options:SubscriptionOptions) () =>void// A method used to update the subscription options (eg. pollingInterval)
0 commit comments