ALFMOB-336 Setup BFF graphql networking#19
Open
hoangnhatdrk wants to merge 9 commits into
Open
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
added 2 commits
May 21, 2026 16:11
…phql_networking' into feature/ALFMOB-336_setup_bff_graphql_networking
Comment on lines
+56
to
+63
| .serverUrl(environmentManager.newUrl()) | ||
| .okHttpClient(okHttpClient) | ||
| .addHttpInterceptor(LoggingInterceptor(level = BODY)) | ||
| .addInterceptor(networkStatusInterceptor) | ||
| .build() | ||
|
|
||
| private fun EnvironmentManager.legacyUrl() = runBlocking { current().legacyGraphQLUrl } | ||
| private fun EnvironmentManager.newUrl() = runBlocking { current().graphQLUrl } |
Contributor
Author
There was a problem hiding this comment.
Not a blocker for now since it's existing pattern, but worth taking a look. I guess it's mainly because we allow users to edit the URL in debug menu and save it in storage.
We can take a look at this and optimize it separately. I'll log a ticket for it.
Contributor
Author
There was a problem hiding this comment.
Comment on lines
22
to
26
| PreProd( | ||
| url = "https://api-preprod.localhost:4000/graphql", | ||
| // TODO(ALFMOB-336): Replace with real PreProd BFF URL once confirmed by the BFF team. | ||
| url = "https://api-preprod.alfie.com/graphql", | ||
| legacyUrl = "https://api-legacy-preprod.alfie.com/graphql", | ||
| buildType = BuildType.BETA |
Contributor
Author
There was a problem hiding this comment.
Ah, auto-complete. Marked with TBD, I'll log a ticket to correct this separately later on once we are ready. We only care about Dev server in this ticket.
Contributor
Author
There was a problem hiding this comment.
Comment on lines
28
to
32
| Prod( | ||
| url = "https://api.localhost:4000/graphql", | ||
| // TODO(ALFMOB-336): Replace with real Prod BFF URL once confirmed by the BFF team. | ||
| url = "https://api.alfie.com/graphql", | ||
| legacyUrl = "https://api-legacy.alfie.com/graphql", | ||
| buildType = BuildType.RELEASE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
apollo3→apollo)10.0.2.2:3000(emulator), PreProd/Prod URLs are TODOnetwork_security_config.xmlto use10.0.2.2instead of hardcoded personal IPlegacy(port 4000) andnew(port 3000, empty — ready for migration)@LegacyClient/@NewClientHilt qualifiers with two separateApolloClientproviders@LegacyClient— no behaviour changeschema-legacy.graphqls,schema-new.graphqls) so builds never require a live serverWhy
Sets up the networking infrastructure to support a feature-by-feature migration from the legacy BFF (port 4000) to the new BFF (port 3000). Each feature migrates independently by writing new queries in
graphql/new/and switching its service to@NewClient.