From d819ff29b11eecc608eb84be3edc0c90506fdb63 Mon Sep 17 00:00:00 2001 From: David Ye Date: Wed, 21 Dec 2016 16:13:03 -0800 Subject: [PATCH] Fix GraphQL error passing to components --- src/graphql.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graphql.tsx b/src/graphql.tsx index a11a52ab9c..345d0e9449 100644 --- a/src/graphql.tsx +++ b/src/graphql.tsx @@ -15,7 +15,6 @@ import assign = require('object-assign'); import hoistNonReactStatics = require('hoist-non-react-statics'); import ApolloClient, { - ApolloError, ObservableQuery, MutationBehavior, MutationQueryReducersMap, @@ -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; }; /*