@shopify/react-graphql
Advanced tools
Comparing version 7.2.0-apollo-3-beta.1 to 7.2.0-apollo-3-beta.2
@@ -67,3 +67,3 @@ 'use strict'; | ||
[queryObservable, client$1, serializedVariables]); | ||
const [responseId, setResponseId] = React.useState(0); | ||
const [isLoading, setIsLoading] = React.useState(true); | ||
React.useEffect(() => { | ||
@@ -74,4 +74,6 @@ if (skip || !queryObservable) { | ||
const invalidateCurrentResult = () => { | ||
setResponseId(x => x + 1); | ||
const invalidateCurrentResult = ({ | ||
loading | ||
}) => { | ||
setIsLoading(loading); | ||
}; | ||
@@ -106,3 +108,3 @@ | ||
if (result.loading) { | ||
if (isLoading) { | ||
data = previousData.current || result && result.data ? _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, previousData.current || {}), result && result.data || {}) : undefined; | ||
@@ -124,4 +126,4 @@ } else if (hasError) { | ||
loading: result.loading | ||
}); // eslint-disable-next-line react-hooks/exhaustive-deps | ||
}, [responseId, skip, queryObservable, defaultResult, previousData]); | ||
}); | ||
}, [isLoading, skip, queryObservable, defaultResult, previousData]); | ||
return currentResult; | ||
@@ -128,0 +130,0 @@ } |
{ | ||
"name": "@shopify/react-graphql", | ||
"version": "7.2.0-apollo-3-beta.1", | ||
"version": "7.2.0-apollo-3-beta.2", | ||
"license": "MIT", | ||
@@ -60,3 +60,3 @@ "description": "Tools for creating type-safe and asynchronous GraphQL components for React", | ||
}, | ||
"gitHead": "a4e75863e038e9f1f44f55193dbdbde7568070ee" | ||
"gitHead": "2cb2821b34c4929a42467c21a9ce9c3487c60d89" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1312
92452