Open tasiotas opened 7 months ago
find a timeout feature too, I set a timeout function globally in flutter's graphql client .In this library current I do like this
showLoading();
GqlLogin({ username: form.username, password: form.password }).then((data) => {
// your code after login success
}).catch((error) => {
setTimeout(() => {
closeLoading();
if (error.gqlErrors[0].message) {
showErrorToast(error.gqlErrors[0].message);
} else {
showErrorToast('network error');
}
}, 300)
});
Because I can get gqlErrors from my server , if not it maybe timeout. lol
Your use case
Hi,
I am not sure if its currently possible to handle long requests by specifying timeout and catching it.
useFetch/$fetch/ofetch does support it very nicely.
The solution you'd like
I would like to specify timeout per composable and define global default in config
Possible alternatives
Not aware of any. Adding timeout to options of useAsyncGql doesnt work
Additional information
No response