API Documentation / @pinia/colada / StreamedQueryOptions_Base
Interface: StreamedQueryOptions_Base<TChunk>
Options for streamedQuery without the reducer and initialValue.
Extended by
Type Parameters
TChunk
TChunk
Properties
refetchMode?
ts
refetchMode?: StreamedQueryRefetchMode;What to do with the existing data when the query is fetched again.
Default
ts
'reset'See
stream
ts
stream: (context) =>
| AsyncIterable<TChunk, any, any>
| Promise<AsyncIterable<TChunk, any, any>>;Function that returns an AsyncIterable (e.g. an async generator). Each chunk is added to the query data as soon as it arrives. Pass the signal to your requests to stop the stream when the query is cancelled.
Parameters
context
Returns
| AsyncIterable<TChunk, any, any> | Promise<AsyncIterable<TChunk, any, any>>