📅  最后修改于: 2022-03-11 15:04:31.360000             🧑  作者: Mango
const { data: cachedData } = useQuery(MyQuery, { fetchPolicy: 'cache-only', variables });
const [executeMyQuery, { data: queryData, loading, error }] = useLazyQuery(MyQuery, {
fetchPolicy: 'network-only'
});
const data = queryData || cachedData;