Lavanyagaur22 / AerogearTasks

0 stars 0 forks source link

Investigate how to handle conflict error #13

Open wtrocki opened 5 years ago

wtrocki commented 5 years ago

When conflict is returned from server we need to catch that and for the moment print this type of error. Obviously, we can do it on user level but we probably need to check interceptors layers. See https://github.com/apollographql/apollo-android/blob/master/apollo-runtime/src/main/java/com/apollographql/apollo/ApolloClient.java#L263 as inspiration.

wtrocki commented 5 years ago

ping @Lavanyagaur22

Lavanyagaur22 commented 5 years ago

@wtrocki Okay, will have a look and do this 👍

Lavanyagaur22 commented 5 years ago

When conflict is returned from server we need to catch that and for the moment print this type of error. Obviously, we can do it on user level but we probably need to check interceptors layers. See https://github.com/apollographql/apollo-android/blob/master/apollo-runtime/src/main/java/com/apollographql/apollo/ApolloClient.java#L263 as inspiration.

@wtrocki For this we need to have a mutation to "upadate" a new task from the android client which will cause conflict (with the older version) and then when it's returned from the server we will catch them through. Right?

wtrocki commented 5 years ago

Exactly. So first we need to extend payload to pass version in queries. We can show version in app as well. This version is an expected server version. Once we have it we can pass it mutation and cause conflict. To cause conflict we can use playground as second client. After thst is done we can record really short video and close development for initial phase.