UNPKG

@shopify/react-graphql

Version:

Tools for creating type-safe and asynchronous GraphQL components for React

18 lines (14 loc) 514 B
import { objectWithoutProperties as _objectWithoutProperties } from './_virtual/_rollupPluginBabelHelpers.js'; import React from 'react'; import { Query } from './Query.mjs'; function Prefetch(_ref) { let { ignoreCache } = _ref, props = _objectWithoutProperties(_ref, ["ignoreCache"]); const fetchPolicy = ignoreCache ? 'network-only' : undefined; return /*#__PURE__*/React.createElement(Query, Object.assign({}, props, { fetchPolicy: fetchPolicy }), () => null); } export { Prefetch };