Skip to content

openapi-react-query throws with null values #1973

Closed
@HugeLetters

Description

@HugeLetters

Description

openapi-react-query crashes if endpoint returns null.

Reproduction

any endpoint which returns null with useQuery exposed by this library

Expected result

null is both valid json and react-query allows to return it from queryFn


This line causes the issue - !data should be replaced with data!==undefined

Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueStraightforward problem, solvable for first-time contributors without deep knowledge of the projectopenapi-react-queryRelevant to openapi-react-query

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions