openapi-react-query-codegen
openapi-react-query-codegen copied to clipboard
Add fallback value to requests
Describe the bug
If a request fails react query throws this error because data cannot be undefined
Query data cannot be undefined. Please make sure to return a value other than undefined from your query function
To Reproduce Steps to reproduce the behavior:
- Use any query generated by this tool and make it throw an error
OpenAPI spec file If possible, please upload the OpenAPI spec file.
Expected behavior Allow adding a fallback value like null, or an empty array or empty string
Screenshots
- OS: [e.g. macOS]
- Version [e.g. v1.0.0]
Additional context Add any other context about the problem here.