Comments (15)
Hi @frankspin89 there are couple of discussions about apollo and vue/nuxt. You might need to wait untill Nuxt 1.x is finalized with an working example of vue-apollo. You can find the discussion here:
nuxt/nuxt#504
I am using the vanilla javascript approach of Pier and it works very neat. If you are using vuex in your app give it a shot: https://github.com/PierBover/vuex-apollo-example-project You can use that approach right away because it almost no dependencies and works without an issue already on Nuxt 0.10.7
from vue-fullstack-graphql.
@dohomi thanks! I started to implement the approach of Pier. The basics are working fine for me. Had to disable subscriptions on the server side.
from vue-fullstack-graphql.
@frankspin89 yes I am using subscriptions only on the client side: nuxt/nuxt#984 I also couldn't require ws on the server side
from vue-fullstack-graphql.
@dohomi Do you also have to use fetchPolicy: 'network-only' to load new data correctly?
from vue-fullstack-graphql.
@frankspin89 no that I only had to use on vue-apollo, but I removed that from my project. With vanilla apollo I do:
const ssr = process.SERVER_BUILD
return new ApolloClient({
networkInterface: networkConf,
dataIdFromObject: r => r.id,
...(ssr ? {
ssrMode: true
} : {
connectToDevTools: process.env.NODE_ENV !== 'production'
})
})
from vue-fullstack-graphql.
thee is this nuxt/nuxt#1160 and this nuxt/nuxt#1161 now
from vue-fullstack-graphql.
That's awesome, thanks @vuchl!
from vue-fullstack-graphql.
an official example came out now for rc2: https://github.com/nuxt/nuxt.js/tree/dev/examples/vue-apollo
from vue-fullstack-graphql.
yes the newly release [vue-apollo](https://github.com/nuxt/nuxt.js/tree/dev/examples/vue-apollo)
is much smarter: there is now a nuxt module nuxt-community/apollo-module that is responsible to provide the apollo client in the nuxt environment. and you only need to specify the graphql endpoint in your nuxt.config.js
. Really well architected.
from vue-fullstack-graphql.
Maybe i'm missing something but the new release seems far from complete? Don't see a option to authenticate requests with a bearer token? And it's lacking a implementation to use subscriptions?
from vue-fullstack-graphql.
it's just a simple example of how to integrate the vue-apollo plugin as a module in nuxt. Detailed Auth examples and mutations are not yet in.
from vue-fullstack-graphql.
Here's a great Nuxt example: https://www.graph.cool/forum/t/nuxt-js-apollo-website-for-sharing-codes/545?u=nilan :) Thanks to @Samuell1 for working on that! 🎉
from vue-fullstack-graphql.
Any update on this?
Tnx
from vue-fullstack-graphql.
I'd recommend to use https://github.com/nuxt-community/apollo-module
from vue-fullstack-graphql.
@sebastianmacias @dohomi @frankspin89 Although pretty late but I had built a blog using node+nuxt+graphQL(apollo)+sequelize here
from vue-fullstack-graphql.
Related Issues (20)
- does not work HOT 2
- No Auth0 example? HOT 2
- Error: Found 1 project file in the current directory. Looks like you'vealready setup your backend. HOT 1
- Error in onboarding Instagram example HOT 2
- Web Socket Error when trying to run the client on vue-fullstack-basic HOT 4
- Can't pre-populate fields in edit forms HOT 2
- Anyone have auth & permission example on vue? HOT 1
- Action Required: Fix Renovate Configuration
- USER_TOKEN is not defined in Signup page HOT 3
- Dependency deprecation warning: babel-preset-es2015 (npm)
- Add License HOT 1
- Apollo2 / graphql-yoga HOT 1
- Has plan start with Vue-cli ?
- graphql complaining that it doesn't know about --boilerplate HOT 2
- "node-pre-gyp ERR! not ok " while building packages HOT 1
- graphql create my-app vue-fullstack-advanced ends with error HOT 1
- graphql-cli upgraded to 4.x.x and `graphql create` no longer works
- Dependency Dashboard
- GraphCool vs Prisma HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-fullstack-graphql.