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

@vue/apollo-option fails during ssr #1424

Closed
Csszabi98 opened this issue Nov 7, 2022 · 4 comments
Closed

@vue/apollo-option fails during ssr #1424

Csszabi98 opened this issue Nov 7, 2022 · 4 comments

Comments

@Csszabi98
Copy link
Contributor

Describe the bug
When @vue/apollo-option mixin is being called on the server the patching of the render function fails as
the code of the library refers to the vue render function incorrectly. During ssr the render function of a vue
component is called "ssrRender" rather than "render".

Problematic code piece

To Reproduce
Steps to reproduce the behavior:

  1. Run any app with @vue/apollo-option with a production build (vite preview)
  2. Open a page which uses apollo during ssr.

Expected behavior
The patching of the cleanup function should not fail.

Versions
vue: 3.2.37
vue-apollo: 4.0.0-alpha.20
@apollo/client: 3.6.9

Csszabi98 pushed a commit to Csszabi98/vuejs-apollo that referenced this issue Nov 7, 2022
@seuck
Copy link

seuck commented Nov 8, 2022

Thanks for providing a solution. Would be great to have it fixed soon.

@icyJochen
Copy link

I got the same issue in my project and looking forward to a fix soon.
Thanks for providing this fix

@MartDD
Copy link

MartDD commented Nov 8, 2022

We had similar issues, looking forward to the fix.

@taksugit
Copy link

taksugit commented Jan 30, 2023

As you said, after upgrading to Nuxt 3.1.0 (Vite4), I encountered the error in production build

Nevertheless, it seems that direct rewriting to ssrRender would be not good because it affects users other than Vite.

Therefore, regarding the patch about clearing Apollo to prevent memory leaks, I suppose we should use another permanent approach.

Akryum pushed a commit that referenced this issue Feb 3, 2023
…1425)

Co-authored-by: Szabolcs Csizmadia <Szabolcs.Csizmadia-ext@querplex.biz>
@Akryum Akryum closed this as completed Feb 3, 2023
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

No branches or pull requests

6 participants