orval icon indicating copy to clipboard operation
orval copied to clipboard

Feature Request: Add specific types for query keys

Open Swoorup opened this issue 3 years ago • 0 comments

Current the svelte query generates the following sample api.

export const getGetDataFeedStreamTradesCachedQueryKey = 
	(params: GetDataFeedStreamTradesCachedParams,) => 
		[`/data-feed/stream/trades-cached`, ...(params ? [params]: [])];

It would be nicer if type for getGetDataFeedStreamTradesCachedQueryKey was instead generated as [string, GetDataFeedStreamTradesCachedParams] instead of auto inferred to (string | GetDataFeedStreamTradesCachedParams)[]

Use case is that sometimes you need to use the url and param for fetch api for streaming http chunks instead of normal request/response which isn't supported by axios.

Swoorup avatar Jul 21 '22 09:07 Swoorup