Open wtrocki opened 5 years ago
ping @Lavanyagaur22
@wtrocki Okay, will have a look and do this 👍
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?
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.
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.