Created
June 15, 2018 14:53
-
-
Save jbaxleyiii/40187bffcfc485832c7ee0aa6de0b425 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { onError } from "apollo-link-error"; | |
const link = onError(({ graphQLErrors, networkError }) => { | |
if (graphQLErrors) | |
graphQLErrors.map(({ message, locations, path }) => | |
// send error to sentry/service here | |
); | |
if (networkError) | |
// send network / client error to sentry/servic here | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment