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

@nuxtjs/apollo mysterious error on server side rendering #128

Closed
yann-yinn opened this issue Aug 29, 2017 · 1 comment
Closed

@nuxtjs/apollo mysterious error on server side rendering #128

yann-yinn opened this issue Aug 29, 2017 · 1 comment

Comments

@yann-yinn
Copy link

yann-yinn commented Aug 29, 2017

Hello ! Apollo is amazing with Vue.js et Nuxt.js, thanks so much @Akryum !
But i have a stranger error on SSR : this throw a 500 error on production server : https://yineo-website-xzfiffgbwg.now.sh/

You must wrap the query string in a "gql" tag.

BUT if work if you go first to contact page, and let client rendered the homepage : https://yineo-website-xzfiffgbwg.now.sh/contact

here is my apollo call :

<template>
  <Presentation :posts="postsQuery.results" />
</template>

<script>
import Presentation from '~/components/Presentation'
import postsQuery from '~/apollo/queries/postsQueryHomepage'
export default {
  transition: 'page',
  components: { Presentation },
  apollo: {
    postsQuery: {
      query: postsQuery,
      prefetch: true
    }
  }
}
</script>

for whatever reason, if i build it locally (npm run build && npm run start), this error does not appear :-/

This question is available on Nuxt.js community (#c75)
@yann-yinn
Copy link
Author

yann-yinn commented Aug 29, 2017

closing, there is a dedicated repo for this module

nuxt-modules/apollo#19

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

1 participant