Skip to content

Troubleshooting

Lam Kieu edited this page Jul 26, 2019 · 2 revisions

Use of *.gql files

To use *gql|graphql files you need to add following dependency to your project:

  yarn add graphql-tag
  # alternative
  npm install graphql-tag

Proxies

CORS errors are most often resolved with proxies. If you see a Cross-Origin-Request error in your client side console look into setting up a proxy. Check out https://github.com/nuxt-community/proxy-module for quick and straight forward setup.

ctx.req.session - req is undefined

This is just a placeholder. You'll want to replace it with whatever storage mechanism you choose to store your token. Here is an example using local storage : https://github.com/Akryum/vue-apollo/issues/144