Skip to content

Suspense Queries that can't connect suspend forever #22

@thomasballinger

Description

@thomasballinger

If the WebSocket can't connect, should the useSuspenseQuery call throw after some timeout? This shouldn't interfere with later operation when e.g. the client goes offline temporarily, but on initial load if data can't load, generally it's the queryFn's job to throw instead of retrying forever.

We ran into this in the TanStack docs: from erquhart/convex-oss-stats#7

This should still fail loudly, but it's totally plausible that the client WebSocket won't work and the hyrated data should be shown.

repro: #21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions