urql-graphql / urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
https://urql.dev/goto/docs
MIT License
8.63k stars 451 forks source link

Make useQuery refetch async #3434

Open davidfant opened 10 months ago

davidfant commented 10 months ago

Summary

In my React app I want to be able to await the refetch function, for example to call another function after refetch is done

Set of changes

Mainly the React package's useQuery.ts. Let me know if there's a better way to promisify this using wonka

changeset-bot[bot] commented 10 months ago

⚠️ No Changeset found

Latest commit: c6e57e47fe3e7c4530452aaf9d8ac0c589bc41f6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR