frandiox / vitesse-ssr-template

🏕 Opinionated Vue + Vite Starter Template with SSR in Node.js
https://vitesse-ssr.vercel.app/
MIT License
188 stars 29 forks source link

Add Apollo #10

Closed jolo-dev closed 3 years ago

jolo-dev commented 3 years ago

Hello,

I have trouble adding VueApollo. I am quite new to Vue3.

Thanks in advanced.

frandiox commented 3 years ago

Hello! Vue-Apollo for Vue 3 is in alpha version and has some bugs, so I'm not sure if it works well.

That said, you can see an example here: https://github.com/frandiox/vite-ssr/blob/vue-apollo/examples/vue-apollo/src/main.js

It won't await for the queries in SSR automatically due to a vue-apollo bug, but you can make your own workaround until that package is fixed I guess: https://github.com/vuejs/vue-apollo/issues/1100

Otherwise, you might be more lucky with urql client.

jolo-dev commented 3 years ago

@frandiox oh wow. Thanks for your reply. I owe you! :)