@shopify/react-graphql
Advanced tools
Comparing version 7.1.11 to 7.1.13
@@ -11,4 +11,4 @@ 'use strict'; | ||
const ApolloContext = /*#__PURE__*/React__default['default'].createContext(undefined); | ||
const ApolloContext = /*#__PURE__*/React__default["default"].createContext(undefined); | ||
exports.ApolloContext = ApolloContext; |
@@ -17,9 +17,9 @@ 'use strict'; | ||
}) { | ||
const providerValue = React__default['default'].useMemo(() => ({ | ||
const providerValue = React__default["default"].useMemo(() => ({ | ||
client, | ||
operations: client.__operations_cache__ | ||
}), [client]); | ||
return /*#__PURE__*/React__default['default'].createElement(reactCommon.ApolloProvider, { | ||
return /*#__PURE__*/React__default["default"].createElement(reactCommon.ApolloProvider, { | ||
client: client | ||
}, /*#__PURE__*/React__default['default'].createElement(ApolloContext.ApolloContext.Provider, { | ||
}, /*#__PURE__*/React__default["default"].createElement(ApolloContext.ApolloContext.Provider, { | ||
value: providerValue | ||
@@ -26,0 +26,0 @@ }, children)); |
@@ -19,3 +19,3 @@ 'use strict'; | ||
function AsyncQuery(options) { | ||
const result = query$1['default'](asyncQuery, options); | ||
const result = query$1["default"](asyncQuery, options); | ||
return options.children(result); | ||
@@ -22,0 +22,0 @@ } |
@@ -13,3 +13,3 @@ 'use strict'; | ||
function useApolloClient(overrideClient) { | ||
const context = React__default['default'].useContext(ApolloContext.ApolloContext); // Ensures that the number of hooks called from one render to another remains | ||
const context = React__default["default"].useContext(ApolloContext.ApolloContext); // Ensures that the number of hooks called from one render to another remains | ||
// constant, despite the Apollo client read from context being swapped for | ||
@@ -30,2 +30,2 @@ // one passed directly as prop. | ||
exports.default = useApolloClient; | ||
exports["default"] = useApolloClient; |
@@ -10,3 +10,3 @@ 'use strict'; | ||
function useBackgroundQuery(load, options) { | ||
const client = apolloClient['default'](); | ||
const client = apolloClient["default"](); | ||
const lastClient = React.useRef(client); | ||
@@ -13,0 +13,0 @@ const lastOptions = React.useRef(options); |
@@ -45,2 +45,2 @@ 'use strict'; | ||
exports.default = useGraphQLDocument; | ||
exports["default"] = useGraphQLDocument; |
@@ -20,3 +20,3 @@ 'use strict'; | ||
} = options; | ||
const client = apolloClient['default'](overrideClient); | ||
const client = apolloClient["default"](overrideClient); | ||
const runMutation = React.useCallback((perMutationOptions = {}) => { | ||
@@ -43,2 +43,2 @@ const mutateVariables = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, variables || {}), perMutationOptions.variables || {}); | ||
exports.default = useMutation; | ||
exports["default"] = useMutation; |
@@ -25,3 +25,3 @@ 'use strict'; | ||
const variables = options.variables || {}; | ||
const client = apolloClient['default'](overrideClient); | ||
const client = apolloClient["default"](overrideClient); | ||
@@ -32,3 +32,3 @@ if (typeof window === 'undefined' && (skip || fetchPolicy === 'no-cache' || !ssr)) { | ||
const query = graphqlDocument['default'](queryOrAsyncQuery); | ||
const query = graphqlDocument["default"](queryOrAsyncQuery); | ||
const normalizedFetchPolicy = typeof window === 'undefined' && (fetchPolicy === 'network-only' || fetchPolicy === 'cache-and-network') ? 'cache-first' : fetchPolicy; | ||
@@ -148,2 +148,2 @@ const serializedVariables = variables && JSON.stringify(variables); | ||
exports.default = useQuery; | ||
exports["default"] = useQuery; |
@@ -21,5 +21,3 @@ 'use strict'; | ||
enumerable: true, | ||
get: function () { | ||
return async.DeferTiming; | ||
} | ||
get: function () { return async.DeferTiming; } | ||
}); | ||
@@ -31,7 +29,7 @@ exports.Query = Query.Query; | ||
exports.createSsrExtractableLink = links.createSsrExtractableLink; | ||
exports.useApolloClient = apolloClient['default']; | ||
exports.useQuery = query$1['default']; | ||
exports.useMutation = mutation['default']; | ||
exports.useApolloClient = apolloClient["default"]; | ||
exports.useQuery = query$1["default"]; | ||
exports.useMutation = mutation["default"]; | ||
exports.createAsyncQueryComponent = component.createAsyncQueryComponent; | ||
exports.createAsyncQuery = query.createAsyncQuery; | ||
exports.useBackgroundQuery = backgroundQuery.useBackgroundQuery; |
@@ -21,3 +21,3 @@ 'use strict'; | ||
const fetchPolicy = ignoreCache ? 'network-only' : undefined; | ||
return /*#__PURE__*/React__default['default'].createElement(Query.Query, Object.assign({}, props, { | ||
return /*#__PURE__*/React__default["default"].createElement(Query.Query, Object.assign({}, props, { | ||
fetchPolicy: fetchPolicy | ||
@@ -24,0 +24,0 @@ }), () => null); |
@@ -17,3 +17,3 @@ 'use strict'; | ||
const opts = [options]; | ||
const result = query['default'](query$1, ...opts); | ||
const result = query["default"](query$1, ...opts); | ||
return children(result); | ||
@@ -20,0 +20,0 @@ } |
{ | ||
"name": "@shopify/react-graphql", | ||
"version": "7.1.11", | ||
"version": "7.1.13", | ||
"license": "MIT", | ||
@@ -29,7 +29,7 @@ "description": "Tools for creating type-safe and asynchronous GraphQL components for React", | ||
"@apollo/react-hooks": ">=3.0.0 <4.0.0", | ||
"@shopify/async": "^3.0.5", | ||
"@shopify/react-async": "^4.1.9", | ||
"@shopify/react-effect": "^4.1.5", | ||
"@shopify/react-hooks": "^2.1.6", | ||
"@shopify/react-idle": "^2.1.4", | ||
"@shopify/async": "^3.0.7", | ||
"@shopify/react-async": "^4.1.11", | ||
"@shopify/react-effect": "^4.1.7", | ||
"@shopify/react-hooks": "^2.1.8", | ||
"@shopify/react-idle": "^2.1.6", | ||
"@shopify/useful-types": "^3.0.5", | ||
@@ -42,3 +42,3 @@ "apollo-cache-inmemory": ">=1.0.0 <2.0.0", | ||
"devDependencies": { | ||
"@shopify/react-testing": "^3.2.7" | ||
"@shopify/react-testing": "^3.2.9" | ||
}, | ||
@@ -66,3 +66,3 @@ "files": [ | ||
}, | ||
"gitHead": "e706481f46b38705389d37e09caf3450630ab0ba" | ||
"gitHead": "e72b4ed29e23c1444a652cd1bf21d906bf01f942" | ||
} |
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
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
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
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
92775
1332
Updated@shopify/async@^3.0.7
Updated@shopify/react-async@^4.1.11
Updated@shopify/react-effect@^4.1.7
Updated@shopify/react-hooks@^2.1.8
Updated@shopify/react-idle@^2.1.6