Skip to content

@tanstack/query: generate type-safe getQueryData helpers #3826

@inas-sirhan

Description

@inas-sirhan

Description

Mirror of #3820 / #3824 but for queryClient.getQueryData. Same motivation: no type-safe generated helpers, users manually pair query keys with response types every time.

Proposing an opt-in getQueryData option (and useGetQueryData hook variant for react-query/preact-query), following the same design as the recently-merged setQueryData.

A PR is ready.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions