@@ -213,7 +213,7 @@ export default function graphql(
213213 // if this query is in the store, don't block execution
214214 try {
215215 readQueryFromStore ( {
216- store : client . store . getState ( ) [ client . reduxRootKey ] . data ,
216+ store : client . queryManager . getApolloState ( ) . data ,
217217 query : opts . query ,
218218 variables : opts . variables ,
219219 fragmentMap : createFragmentMap ( opts . fragments ) ,
@@ -331,7 +331,6 @@ export default function graphql(
331331 return ;
332332 }
333333
334- const { reduxRootKey } = this . client ;
335334 const queryOptions = this . calculateOptions ( this . props ) ;
336335 const fragments = calculateFragments ( queryOptions . fragments ) ;
337336 const { variables, forceFetch, skip } = queryOptions as QueryOptions ;
@@ -363,7 +362,7 @@ export default function graphql(
363362 if ( ! forceFetch ) {
364363 try {
365364 const result = readQueryFromStore ( {
366- store : this . store . getState ( ) [ reduxRootKey ] . data ,
365+ store : this . client . queryManager . getApolloState ( ) . data ,
367366 query : document ,
368367 variables,
369368 fragmentMap : createFragmentMap ( fragments ) ,
@@ -445,7 +444,6 @@ export default function graphql(
445444 }
446445
447446 handleQueryData ( observableQuery : ObservableQuery , { variables } : WatchQueryOptions ) : void {
448- const { reduxRootKey } = this . client ;
449447 // bind each handle to updating and rerendering when data
450448 // has been recieved
451449 let refetch ,
@@ -457,7 +455,8 @@ export default function graphql(
457455
458456 const next = ( { data = oldData , loading, error } : any ) => {
459457 const { queryId } = observableQuery ;
460- let initialVariables = this . store . getState ( ) [ reduxRootKey ] . queries [ queryId ] . variables ;
458+
459+ let initialVariables = this . client . queryManager . getApolloState ( ) . queries [ queryId ] . variables ;
461460
462461 const resultKeyConflict : boolean = (
463462 'errors' in data ||
0 commit comments