Nuxt/examples/vue-apollo/middleware/apollo.js
2017-04-14 12:52:27 +02:00

8 lines
212 B
JavaScript

export default async function ({ isServer, apolloProvider }) {
if (isServer) {
const ensureReady = apolloProvider.collect()
console.log('Call ensureReady!', ensureReady())
await ensureReady()
}
}