From 3689d90e8aaf4671a614fa67f1409f8a1206361b Mon Sep 17 00:00:00 2001 From: Dread Date: Tue, 14 Jul 2026 14:57:47 -0700 Subject: [PATCH] fix(bank-account): regenerate federation supergraph for pendingUpdate [ENG-509] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #444 added `pendingUpdate` to the public subgraph schema but never regenerated the composed Apollo Router supergraph. The router validates against that baked-in supergraph, so it rejects `bankAccounts { pendingUpdate }` with GRAPHQL_VALIDATION_FAILED (400) even on images built from #444 — which blocks the mobile cashout screen ("No bank account found") on TEST. Ran `make codegen` to recompose the supergraph. Only the generated supergraph.graphql changes (58 insertions, 0 deletions). Co-Authored-By: Claude Opus 4.8 (1M context) --- dev/apollo-federation/supergraph.graphql | 58 ++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/dev/apollo-federation/supergraph.graphql b/dev/apollo-federation/supergraph.graphql index 663f4f3e1..a538ffbe1 100644 --- a/dev/apollo-federation/supergraph.graphql +++ b/dev/apollo-federation/supergraph.graphql @@ -384,6 +384,11 @@ type BankAccount """ERPNext bank account identifier""" id: ID isDefault: Boolean! + + """ + The account's in-flight update request when it needs the user's attention — Pending (awaiting review) or Rejected (declined). Null once approved/closed, or when none exists. + """ + pendingUpdate: BankAccountUpdateRequest } input BankAccountInput @@ -396,6 +401,58 @@ input BankAccountInput currency: String! } +""" +A pending request to change the details of an approved bank account, awaiting admin review. +""" +type BankAccountUpdateRequest + @join__type(graph: PUBLIC) +{ + """Proposed new account number""" + accountNumber: String! + + """Proposed new account type""" + accountType: String! + + """Proposed new bank branch""" + bankBranch: String! + + """Proposed new bank name""" + bankName: String! + + """Account currency (unchanged from the current account)""" + currency: String! + + """Reviewer note, set when status is Rejected""" + rejectionReason: String + + """Pending | Approved | Rejected | Closed""" + status: String! +} + +input BankAccountUpdateRequestInput + @join__type(graph: PUBLIC) +{ + accountNumber: AccountNumber! + accountType: String! + + """ERPNext identifier of the account to update""" + bankAccountId: ID! + bankBranch: String! + bankName: String! + + """Must match the account's current currency (currency is locked)""" + currency: String! +} + +type BankAccountUpdateRequestPayload + @join__type(graph: PUBLIC) +{ + errors: [Error] + + """Status of the created request (Pending on success)""" + status: String +} + type BridgeAddExternalAccountPayload @join__type(graph: PUBLIC) { @@ -1486,6 +1543,7 @@ type Mutation Rotate an API key: a replacement with a new secret (and keyId) is created with the same name, scopes, and expiry, and the old key is revoked. The new raw key is only shown once. """ apiKeyRotate(input: ApiKeyRotateInput!): ApiKeyRotatePayload! + bankAccountUpdateRequest(input: BankAccountUpdateRequestInput!): BankAccountUpdateRequestPayload! bridgeAddExternalAccount: BridgeAddExternalAccountPayload! bridgeCancelWithdrawalRequest(input: BridgeCancelWithdrawalRequestInput!): BridgeCancelWithdrawalRequestPayload! bridgeCreateExternalAccount(input: BridgeCreateExternalAccountInput!): BridgeCreateExternalAccountPayload!