Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #380 from davidye/master
Browse files Browse the repository at this point in the history
Fix GraphQL error passing to components
  • Loading branch information
Tom Coleman authored Dec 22, 2016
2 parents 381ce7e + d819ff2 commit 7868957
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/graphql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import assign = require('object-assign');
import hoistNonReactStatics = require('hoist-non-react-statics');

import ApolloClient, {
ApolloError,
ObservableQuery,
MutationBehavior,
MutationQueryReducersMap,
Expand Down Expand Up @@ -379,7 +378,8 @@ export default function graphql(
};

const handleError = (error) => {
if (error instanceof ApolloError) return next({ error });
// Quick fix for https://github.com/apollostack/react-apollo/issues/378
if (error.hasOwnProperty('graphQLErrors')) return next({ error });
throw error;
};
/*
Expand Down

0 comments on commit 7868957

Please sign in to comment.