Skip to content

fix(vue): enforce types so nested refs can't be in variables#3852

Closed
JoviDeCroock wants to merge 2 commits intomainfrom
vue-variables-deep-unwrap
Closed

fix(vue): enforce types so nested refs can't be in variables#3852
JoviDeCroock wants to merge 2 commits intomainfrom
vue-variables-deep-unwrap

Conversation

@JoviDeCroock
Copy link
Copy Markdown
Collaborator

@JoviDeCroock JoviDeCroock commented Feb 25, 2026

Resolves #3834

Summary

  • Add type constraint so variables can be reactive but it's children can't be

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 25, 2026

🦋 Changeset detected

Latest commit: d8396cb

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

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Feb 25, 2026

Deploying urql with  Cloudflare Pages  Cloudflare Pages

Latest commit: d8396cb
Status: ✅  Deploy successful!
Preview URL: https://90aa2694.urql.pages.dev
Branch Preview URL: https://vue-variables-deep-unwrap.urql.pages.dev

View logs

Comment thread packages/vue-urql/src/utils.ts Outdated
return prototype === Object.prototype || prototype === null;
};

const unwrapVariables = (value: unknown): unknown => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think, this was explicitly removed already before, then re-added, then removed. I don't think we want to get into that loop again. Both is valid and has merit, but the last conclusion was to let people use computed.

@JoviDeCroock JoviDeCroock force-pushed the vue-variables-deep-unwrap branch 2 times, most recently from e26a084 to d8396cb Compare February 25, 2026 17:22
@JoviDeCroock JoviDeCroock changed the title fix(vue): unwrap refs in object query variables fix(vue): enforce types so nested refs can't be in variables Feb 25, 2026
@JoviDeCroock JoviDeCroock deleted the vue-variables-deep-unwrap branch March 31, 2026 18:37
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.

Vue Reactive Variables no longer work with @urql/vue 2

2 participants