Is your feature request related to a problem? Please describe.
Yes, I would like to hook error handling of apollo-client to display a toast
Describe the solution you'd like
ideally I could import something like
import {showToast} from "@chakra-ui/core"
showToast({
title: "There was an error:",
description: err.message,
duration: 7000,
status: 'error'
})
Describe alternatives you've considered
I could use a toast library like for example https://github.com/CodeSeven/toastr
but I can't theme it with chakra theme and it looks totally different.
Additional context
It might be that the toast will need a portal to the DOM, where there is chakra theme context.
If that's the case, I am fine with putting that into my app. As long as I can then call the globalToast from anywhere outside react.
Hi @capaj,
We've added support for this in preparation for v1.
Thanks for your suggestion!
Most helpful comment
Hi @capaj,
We've added support for this in preparation for v1.
Thanks for your suggestion!