Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vue): Support getter-functions on MaybeRef-typed inputs #3582

Merged
merged 2 commits into from
May 7, 2024

Conversation

kitten
Copy link
Member

@kitten kitten commented May 3, 2024

Resolves #3556

Summary

Supports getter functions on MaybeRef-typed inputs.

Set of changes

  • Add (() => T) to MaybeRef and handle in unref

@kitten kitten requested a review from JoviDeCroock May 3, 2024 11:22
Copy link

changeset-bot bot commented May 3, 2024

🦋 Changeset detected

Latest commit: 3843dd2

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

@kitten kitten merged commit 9bf3289 into main May 7, 2024
13 checks passed
@kitten kitten deleted the feat/vue-getter-syntax branch May 7, 2024 10:54
@github-actions github-actions bot mentioned this pull request May 4, 2024
const isPaused: Ref<boolean> = isRef(_args.pause)
? _args.pause
: ref(!!_args.pause);
const isPaused = ref(!!unref(args.pause));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reactivity for pause is lost due to this change.

Copy link
Contributor

@negezor negezor May 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kitten can you look at this? Since this is a breaking change. Since we now cannot work with pause from the hook itself, without calling pause() and resume() or modifying isPaused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFC: @urql/vue - Allow getter syntax in useQuery
3 participants