Skip to content

Add fallback value to requests #148

Open
@bryanjtc

Description

@bryanjtc

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:

  1. 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
image

  • OS: [e.g. macOS]
  • Version [e.g. v1.0.0]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions