Offline requests block promises. This will mean that code in success will never be called until the device becomes online.
{code} return this.apollo.mutate<Task>().then((retry)=>{ // Never called when offline. // This will be resolved only when online }).catch((error)=>{ // Never called when offline // This will be resolved only when online }); {code}
h3. Investigated approach
{code} return this.apollo.mutate<Task>().then((retry)=>{ // Never called when offline. // This will be resolved only when online }).catch((error)=>{ if(error.conflict){ // User will get error with conflict } }); {code} |
|