Skip to content

useQuery and useLazyQuery should also return a promise #1486

@ibex-david

Description

@ibex-david

The problem is that i still want to wait for a specific request made by the lazy query.

// at my store:
const { load, loading, error, result } = useLazyQuery()

// inside the component:
const data = await load()

Because load doesn't return the current request promise, many reactive variables needed to be watched unwillingly.

The suggested solution

load() should return the promise to the current request.
also every other fetching function like rerun etc.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions