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

Server Side rendering : "You must wrap the query string in a "gql" tag" #19

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

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 and @Atinux !
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 (#c11)
@KosmyninOleksandr
Copy link

I still have this error

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

2 participants