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

Use of apollo-error-link with version 4? #115

Closed
aldarund opened this issue Jun 13, 2018 · 3 comments
Closed

Use of apollo-error-link with version 4? #115

aldarund opened this issue Jun 13, 2018 · 3 comments

Comments

@aldarund
Copy link
Contributor

aldarund commented Jun 13, 2018

How to add use of apollo-error-link with version 4 ?
In version 3 i was having this:

const errorLink = onError(({ graphQLErrors, networkError }) => {
    if (networkError) {
      ctx.app.$messages.showErrorMessage(networkError.message)
    }
    if (graphQLErrors) {
      graphQLErrors.map(({ message }) =>
        ctx.app.$messages.showErrorMessage(message)
      )
    }
  })
  const link = middlewareLink.concat(errorLink).concat(httpLink)
  return {
    link,
    cache: new InMemoryCache()
  }

I dont see how can i add onError handler for version 4 of plugin.

PS asked on cmty as question ( https://cmty.app/nuxt/apollo-module/issues/c93 ) but it doesnt import into github and i didnt see any replied to any questions that is solely on cmty without github, so it made me think that its not monitored at all..

This question is available on Nuxt community (#c97)
@ghost ghost closed this as completed Jun 13, 2018
@ghost ghost added the cmty:question label Jun 13, 2018
@ghost
Copy link

ghost commented Jun 13, 2018

This issue as been imported as question since it does not respect apollo-module issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/apollo-module/issues/c97.

@dohomi
Copy link
Contributor

dohomi commented Jun 14, 2018

@aldarund seems that currently there is no option to set in in https://github.com/Akryum/vue-cli-plugin-apollo/blob/master/graphql-client/src/index.js

Open an issue there if you rely on onError - all configuration option from that plugin will be available here.

@dohomi
Copy link
Contributor

dohomi commented Jun 22, 2018

@aldarund I will close the issue here. Please open a ticket on vue-cli-plugin-apollo as soon the option is available there I will provide its functionality in this package as well

@dohomi dohomi closed this as completed Jun 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants