Please update apollo to the neweset version... is this project staying maintained?

dylanmcgowan
3
dylanmcgowan
commented 4 months ago

What problem does this feature solve?

The version of vue-apollo that @nuxtjs/apollo uses is riddled with bugs. The maintainer has squashed a lot of them (almost two weeks ago) and has since released a new version.

In particular there was a bug with SSR that screams and throws errors with plugins that modify the vue prototype i.e. vee-validate.

Ive been locked in nuxt 1.4 because of this package. And I really don't want to be. Can you please update this projects dependencies?

What does the proposed changes look like?

Upgrading vue-apollo to 3.0.0.beta-26

idea
1
kevinmarrec
230
kevinmarrec
commented 4 months ago

I want to add that vue-apollo provides better TypeScript support since their 3.0.0.beta-20, but that the apollo-module last stable release (rc2.3) is using [email protected] so there is no relevant TypeScript support.

Last update on this repo was at the beginning of October :/, I think it's a lack of time of the maintainer.

@dylanmcgowan You can still force your project to use "@nuxtjs/apollo": "^4.0.0-rc3" (pre-release), you'll have vue-apollo to 3.0.0.beta-25, but it might be not stable.

0
dohomi
1.4k
dohomi
commented 4 months ago

If you guys drop in vue-apollo beta.25 I'm afraid SSR async components will break, here the reference: https://github.com/Akryum/vue-apollo/issues/402
That is the reason why this project currently pins beta.19. But there are already PR's in the queue to solve this but unfortunately none of them will work for SSR at the moment.

0
kevinmarrec
230
kevinmarrec
commented 4 months ago

@dohomi Alright thanks for the reference, Akryum seems to have made a PR on official Vue repo which should make the related issue fixed. Last PR update/review request was 12 days ago, I hope someone of the Vue core team will merge it soon :).

Otherwise @dohomi you can confirm that we should be fine using 4.0.0-rc3 ([email protected]) if we don't use Async Components ?

EDIT : Lot of libraries like vuetify are using async components so R.I.P for now ^^

0
dohomi
1.4k
dohomi
commented 4 months ago

@kevinmarrec please check the current master branch in your project, but I'm afraid it will fail due to the hydration issue (https://github.com/vuejs/vue/pull/9017)

I'm running v4.0.0-rc2.3 - which is the most recent one.

0
kevinmarrec
230
kevinmarrec
commented 4 months ago

@dohomi I checked and can confirm there are issues.
I'm fine with v4.0.0-rc2.3, I was just missing new TypeScript definitions that have been implemented on newest versions of vue-apollo. I copied their types within my project and it works, it's not the best but it's a workaround until the issue is fixed.

I also made a PR yesterday to provide TypeScript support for the $apolloHelpers object, but it would need to be merged on both master and a new v4.0.0-rc2.4 version.

0
dohomi
1.4k
dohomi
commented 4 months ago

@kevinmarrec yes thanks I've seen it. If you like to make your TypeScript changes agains the rc2.3 I'm happy to make release a 2.4 out of it.

0
dylanmcgowan
3
dylanmcgowan
commented 4 months ago

Hey thanks for responding and explaining what's going on. I wish it was easier to see the state of PRs and project roadmaps so we could know what's happening at a high level.

I'm happy that the fixes exist, really hoping they get merged soon! I really dig this package and I really dig nuxt, and yeah technical debt is inevitable but it stinks seeing projects lag behind

0
kevinmarrec
230
kevinmarrec
commented 4 months ago

@dohomi Yeah I would want a rc2.4 with it, until we're able to have a working rc3.
What are the steps to merge my PR against rc2.3 ? => Please answer in the PR :)

0
rnenjoy
5
rnenjoy
commented 3 months ago

Can someone give me a hit on what to run ? I dont understand what the latest news is. Should i run RC 2.3 with Vue apollo beta 26? Cause it isnt working

0
zelid
0
zelid
commented a month ago

If someone is missing TypeScript definitions for apollo-module like this.$apolloHelpers.onLogin(res.data.login.token) this blog posts provides it http://tech.innovation.co.jp/2019/01/25/Nuxt-Typescript.html as:

import Vue from 'vue';
import VueRouter from 'vue-router';
import {DollarApollo} from './app/shared/apollo/vue-apollo';
import {ApolloClient} from 'apollo-client';

declare module '*. vue' {
    const _default: Vue
    export default _default
}

/ **
 * Add global properties
 * /
declare module 'vue / types / vue' {
    interface Vue {
        $ router: VueRouter,
        $ apollo: DollarApollo <any>,
        $ apolloHelpers: {
            onLogin (token: string, apolloClient ?: ApolloClient <{}>, tokenExpires ?: number): Promise <void>;
            onLogout (apolloClient ?: ApolloClient <{}>): Promise <void>;
            getToken (tokenName ?: string): string;
        }
    }
}

/ **
 * Add component options
 * /
declare module 'vue / types / options' {
    interface ComponentOptions <V extends Vue> {
        layout ?: string
        middleware ?: string | String []
    }
}
0
kevinmarrec
230
kevinmarrec
commented a month ago

Thanks @zelid, we'll add these types directly in the package in coming weeks.

@dohomi What's the current status of the project ? Can we update to last vue-apollo ?

0
dohomi
1.4k
dohomi
commented a month ago

@kevinmarrec can you open a PR? I currently stuffed at work and all the projects doesn't even use graphql..

0
dohomi
1.4k
dohomi
commented a month ago

Please update to rc-4 - this should work if not reopen again

0
Informations
Feature Request โ€ข Open
#c160 - Created 4 months ago