Nuxt/examples/vue-apollo/middleware/apollo.js

8 lines
212 B
JavaScript
Raw Normal View History

2017-04-14 10:52:27 +00:00
export default async function ({ isServer, apolloProvider }) {
if (isServer) {
const ensureReady = apolloProvider.collect()
console.log('Call ensureReady!', ensureReady())
await ensureReady()
}
}