cache cache apollo code example
Example: apollo clear cache for query
const { data: cachedData } = useQuery(MyQuery, { fetchPolicy: 'cache-only', variables });
const [executeMyQuery, { data: queryData, loading, error }] = useLazyQuery(MyQuery, {
fetchPolicy: 'network-only'
});
const data = queryData || cachedData;