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

Refactor Client.call() to use middlewares #145

Open
wants to merge 3 commits into
base: feat-offline-support-refactor
Choose a base branch
from

Conversation

stnguyen90
Copy link

What does this PR do?

Break apart Client.call() using middlewares.

Test Plan

Manual

Related PRs and Issues

Have you read the Contributing Guidelines on issues?

Yes

Previously, we added various caching metadata in the services and
passed those to the Client so that the Client knew where to cache the
data. This was a little messy and decentralized the offline support
code.

By adding a router, we can match against the path the Client receives
and determine where to cache the data.
@@ -0,0 +1,80 @@
final routes = [
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking this could be generated by the SDK generator.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, i'm okay with generating by SDK generator if that is easier than hardcoding.

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

Successfully merging this pull request may close these issues.

None yet

2 participants