PART3: feat(settings): Migrate fxa-settings from GraphQL to direct auth-client (cutover)#19981
Conversation
d8b0f36 to
5886060
Compare
2c6b6b1 to
2381c6c
Compare
| await page.goto( | ||
| `${target.contentServerUrl}?context=fx_desktop_v3&service=sync&action=email` | ||
| ); | ||
| await signin.respondToWebChannelMessage(customEventDetail); |
There was a problem hiding this comment.
Why do we have to do this? It seems like in a fucntional tests stuff like this shouldn't be needed.
There was a problem hiding this comment.
Yea, this was surprising to me. Wit the graphql removal, these started to fail, however they were not structured the same way as the other tests which did do this. Its possible that our graphql approach was masking something.
There was a problem hiding this comment.
Have we manually tested this flow? A user won't be able to trigger that respondToWebChannelMessage call, which makes me question if this actually works or we lost something important in the migration.
There was a problem hiding this comment.
Tested this locally and the signin/up works as expected, no hanging.
2a61055 to
3ae556c
Compare
ddbcc46 to
d727638
Compare
Because
fxa-graphql-apiservice adds unnecessary latency and complexity betweenfxa-settingsandfxa-auth-serverThis pull request
ApolloProvider,ApolloClient, and all GQL mutations/queries from the fxa-settings entrypoint and page containersfxa-auth-clientmethods (signInWithAuthPW,getCredentialStatusV2,sendUnblockCode, etc.)account-storage.ts— unified localStorage-based account state replacing the ApolloInMemoryCacheAccountStateContextandAuthStateContextReact contexts for reactive state managementuseAccountDatahook that fetches account, profile, and attached clients data in parallel via auth-clientgql-key-stretch-upgradetoauth-key-stretch-upgrade, now calling auth-client directlygql.ts)@apollo/clientandgraphqlfromfxa-settingsdependenciesPageMfaGuardWithGqlTest(GQL-only test page)Issue
Closes: https://mozilla-hub.atlassian.net/browse/FXA-12995
Checklist
Other Information
Scope: 90 files changed, ~2,600 insertions, ~2,700 deletions
Breaking changes: The
fxa-graphql-apiserver is no longer required forfxa-settingsto function. CSP rules for the GQL endpoint have been removed from content-server configuration.Legacy shim:
gql.tsandcache.tsretain a no-op Apollo cache shim for files not yet migrated (PostVerify, SetPassword, InlineRecoveryKeySetup). These should be cleaned up in a follow-up.