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

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

Closed
dylanmcgowan opened this issue Nov 20, 2018 · 13 comments

Comments

@dylanmcgowan
Copy link

dylanmcgowan commented Nov 20, 2018

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

This feature request is available on Nuxt community (#c160)
@ghost ghost added the cmty:feature-request label Nov 20, 2018
@kevinmarrec
Copy link
Contributor

kevinmarrec commented Nov 20, 2018

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 vue-apollo@3.0.0.beta-19 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.

@dohomi
Copy link
Contributor

dohomi commented Nov 20, 2018

If you guys drop in vue-apollo beta.25 I'm afraid SSR async components will break, here the reference: vuejs/apollo#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.

@kevinmarrec
Copy link
Contributor

kevinmarrec commented Nov 20, 2018

@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 (vue-apollo@3.0.0.beta-25) if we don't use Async Components ?

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

@dohomi
Copy link
Contributor

dohomi commented Nov 21, 2018

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

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

@kevinmarrec
Copy link
Contributor

kevinmarrec commented Nov 21, 2018

@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.

@dohomi
Copy link
Contributor

dohomi commented Nov 21, 2018

@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.

@dylanmcgowan
Copy link
Author

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

@kevinmarrec
Copy link
Contributor

@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 :)

@rnenjoy
Copy link

rnenjoy commented Jan 1, 2019

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

@zelid
Copy link

zelid commented Feb 4, 2019

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 []
	}
}

@kevinmarrec
Copy link
Contributor

kevinmarrec commented Feb 9, 2019

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 ?

@dohomi
Copy link
Contributor

dohomi commented Feb 11, 2019

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

@dohomi
Copy link
Contributor

dohomi commented Feb 15, 2019

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

@dohomi dohomi closed this as completed Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants