From 394a1e49b9f31013df6e7d3190da69c76c2f417b Mon Sep 17 00:00:00 2001 From: Tommy Jonsson Date: Wed, 24 Oct 2018 11:35:38 +0200 Subject: [PATCH] diffQueryAgainsStore set returnPartialData to false Is there a reason why returnPartialData is true? This was hiding an error and returning { data: undefined, networkState: 7, stale: true } for me. I had forgotten to query for the id of an object and watchQuery could not find it in store. With returnPartialData false i was able to get an error about missing property and finally find the problem. With this true all i was getting from watchQuery was { data: undefined, networkState: 7, stale: true }. Maybe related issues: #3030 , #2914 --- packages/apollo-cache-inmemory/src/readFromStore.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/apollo-cache-inmemory/src/readFromStore.ts b/packages/apollo-cache-inmemory/src/readFromStore.ts index 5d92e094063..9c6c64989d2 100644 --- a/packages/apollo-cache-inmemory/src/readFromStore.ts +++ b/packages/apollo-cache-inmemory/src/readFromStore.ts @@ -192,7 +192,7 @@ export class StoreReader { query, variables, previousResult, - returnPartialData = true, + returnPartialData = false, rootId = 'ROOT_QUERY', fragmentMatcherFunction, config,