@shopify/react-graphql
Version:
Tools for creating type-safe and asynchronous GraphQL components for React
8 lines (7 loc) • 335 B
JavaScript
import React from 'react';
import { Query } from './Query';
export function Prefetch(_a) {
var { ignoreCache } = _a, props = __rest(_a, ["ignoreCache"]);
const fetchPolicy = ignoreCache ? 'network-only' : undefined;
return (React.createElement(Query, Object.assign({}, props, { fetchPolicy: fetchPolicy }), () => null));
}