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

feat(vue): allow vue 2.7 #2561

Merged
merged 2 commits into from
Jul 25, 2022
Merged

feat(vue): allow vue 2.7 #2561

merged 2 commits into from
Jul 25, 2022

Conversation

dargmuesli
Copy link
Contributor

Summary

Resolves #2560

Set of changes

  • urql/vue peer dependency set to allow Vue 2.7 in addition to Vue 3

@changeset-bot
Copy link

changeset-bot bot commented Jul 25, 2022

🦋 Changeset detected

Latest commit: 9d1222e

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

Copy link
Member

@kitten kitten left a comment

Choose a reason for hiding this comment

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

This is fantastic news! Also love the Naruto reference, haha 😄
I don't have enough bandwidth to test whether this is working as intended, but I'd assume that we'll get enough information from publishing this and finding out that way ✌️

Edit: I had a quick read. My prior assumption was that Vue 3's reactivity framework is pretty portable, so I don't expect problems there. I suppose the only feature that won't work is the async setup initialisation i.e. Vue Suspense, which is not our tradeoff to make, so our API will work just as well as can be expected, I guess 👍

@kitten kitten merged commit 70a149e into urql-graphql:main Jul 25, 2022
@dargmuesli dargmuesli mentioned this pull request Jul 25, 2022
@urql-ci urql-ci mentioned this pull request Jul 25, 2022
@dargmuesli dargmuesli deleted the feat/vue/2.7 branch July 25, 2022 01:06
@dargmuesli
Copy link
Contributor Author

dargmuesli commented Jul 25, 2022

Yes, indeed. Just saw the note in the readme: https://github.com/FormidableLabs/urql/blob/70a149ed15370154541d9bbd260ddf62b5e3ffb1/packages/vue-urql/README.md?plain=1#L25
That could be changed to indicate Vue 2.7 support too, of course.


For anyone coming here in a future google, this is the shortened way I added urql as Nuxt bridge plugin:

import { createClient } from '@urql/core'
import { provideClient } from '@urql/vue'
import { defineNuxtPlugin, useNuxtApp } from '#app'

export default defineNuxtPlugin((nuxt) => {
  const client = createClient({
    url: '...'
  })
  nuxt.provide('urql', client)
  nuxt.hook('vue:setup', () => {
    const { $urql } = useNuxtApp()
    provideClient($urql)
  })
})

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: allow Vue 2.7
2 participants