query pageQueryProducts($page: Int, $perPage: Int, $filter: ProductFilter) {
products(page: $page, perPage: $perPage, filter: $filter) {
count
items {
id
productName
}
pageInfo {
perPage
currentPage
}
}
}
Is there any way to delete cache by "pageQueryProducts"?
Assuming you're using @apollo/[email protected], you should be able to do this:
cache.evict("ROOT_QUERY", "products")
If the pageQueryProducts query had more than one root field, you could call cache.evict for each field. Does that help?
Nice, it works for me. I will upgrade to 3.x
This works but does not trigger a re-render if the query is displayed. Any idea how to do it?
Most helpful comment
Nice, it works for me. I will upgrade to 3.x