openapi-react-query-codegen icon indicating copy to clipboard operation
openapi-react-query-codegen copied to clipboard

fix: Use optional query keys also without parameters

Open mmurto opened this issue 3 months ago • 1 comments

The query key functions for queries that don't take in additional request parameters don't allow for using additional query key input, but query hooks always take in a query key parameter. This leads to the query key parameter in hooks without additional input being unused variable, leading to TypeScript erroring. Fix this by always taking query key parameter in query key functions, and always using it in query hooks.

Fixes #112.

mmurto avatar May 16 '24 09:05 mmurto