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.54k stars 444 forks source link

fix(vue): pause not working with getters #3598

Closed arkandias closed 2 weeks ago

arkandias commented 1 month ago

Summary

This PR fixes a bug noted by @negezor: the pause property was not working with a getter, see https://github.com/urql-graphql/urql/pull/3595#issuecomment-2142285519.

Set of changes

1) Minor fixes in useQuery.ts and useSubscription.ts to manage the case where pause is a getter.

2) Corrected some typos in the docs of useQuery.ts and useSubscription.ts.

3) Modified a test in useQuery.test.ts to use a reactive pause property with a getter.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: c2f68f825ad907e0551e082525802c319e1386e0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | --------- | ----- | | @urql/vue | Patch |

Not sure what this means? Click here to learn what changesets are.

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

arkandias commented 3 weeks ago

@kitten I think the PR is ready now. It reverts the changes from PR #3595 (that restored pause reactivity but broke the usage of a getter) and adds a watcher instead (as suggested by @negezor). Let me know if I can do anything.

negezor commented 2 weeks ago

@kitten could you please consider this PR?

kitten commented 2 weeks ago

Can you add a changeset to this please? Guidance for this can be found here: https://github.com/urql-graphql/urql/blob/main/CONTRIBUTING.md#how-do-i-document-a-change-for-the-changelog

arkandias commented 2 weeks ago

Can you add a changeset to this please? Guidance for this can be found here: https://github.com/urql-graphql/urql/blob/main/CONTRIBUTING.md#how-do-i-document-a-change-for-the-changelog

I pushed a change log following the instructions. Let me know if you need something else.

arkandias commented 2 weeks ago

Thank you!