Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions: How to combine multiple UseCase? #111

Open
rommansabbir opened this issue May 20, 2021 · 4 comments
Open

Questions: How to combine multiple UseCase? #111

rommansabbir opened this issue May 20, 2021 · 4 comments

Comments

@rommansabbir
Copy link

Scenario:

  • I have 3 UseCase to perform 3 different API Request.
  • Based on the 3 UseCase response I need to combine them all according to the business logic.

Right now, I'm doing it by calling the 1st UseCase, then based on response, then another & so on.

So, how can I combine/zip them all in a single request or chain them one by one in a proper way?

@pankajpy
Copy link

pankajpy commented May 20, 2021 via email

@rommansabbir
Copy link
Author

@pankajpy actually, I'm talking about how to merge/combine multiple UseCase into one. Yes, I know how to merge multiple API calling using Coroutine but UseCase is missing in this scenario.

@lrnrzg
Copy link
Collaborator

lrnrzg commented May 23, 2021

Have a try to combine response in the Repository layer and then pass the Repository to a new UseCase.

@rommansabbir
Copy link
Author

@ZhuSniffsTheRose Yes got your point. But the scenario is:

  • Have 3 Different Repository for Different Purpose
  • Have 3 Different Use Case for 3 Different Purpose

Now, I can call all required api one by one in a single use by adding their dependency, but I want to combine merge/combine multiple UseCase into one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants