Hi, I’m trying to use a ViewModel to chain queries...
# android
a
Hi, I’m trying to use a ViewModel to chain queries to an API. eg, The first query returns an invoice with customer id’s, the second query returns the customer data related to those id’s. From what I’ve been reading I need to use a MediatorLiveData to observe LiveData objects representing the API calls, but I’m not really understanding how to chain these and only return a result, once I’ve received both responses. Does anybody have some documentation or an example to help me out here?
g