OptionalexpiryMs?: numberms before data is removed from cache; 0 means never expire.
OptionalkeepLastNonEmptyData?: booleanKeep a copy of the last non-empty data so that when you change the query arguments, you can still display the old data while waiting for the new data to load.
Optionallog?: (...args: unknown[]) => voidCustomize the logger.
OptionalmaxBytes?: numberMax number of bytes to keep. The oldest entries will be discarded. The last record cannot be discarded. 0 means no limit.
OptionalmaxSize?: numberMax number of entries to keep. The oldest entries will be discarded. The last record cannot be discarded. 0 means no limit.
OptionalpersistTo?: PersistToShortcut to set the localStorageKey or indexedDbKey automatically from queryName. This is important because it avoids requiring the user to specify the same queryName twice everytime.
Function to fetch data.
The name could have been auto-generated, but we let the user give us a human-readable name that can be identified quickly in the logs. Note that the queryKey is a string formed by the queryName plus the query arguments.
OptionalrefetchOnStale?: booleanTrigger background re-fetch if stale.
OptionalstaleMs?: numberms before data considered stale; 0 means always stale.
Options to configure a shared query.