Skip to content

fix(schema): change accountNumber from Int to String (ENG-291)#319

Open
patoo0x wants to merge 1 commit intomainfrom
fix/eng-291-account-number-string
Open

fix(schema): change accountNumber from Int to String (ENG-291)#319
patoo0x wants to merge 1 commit intomainfrom
fix/eng-291-account-number-string

Conversation

@patoo0x
Copy link
Copy Markdown
Contributor

@patoo0x patoo0x commented Apr 5, 2026

Root Cause (confirmed by ajemonx)

HTTP 400 on account upgrade Step 4. Original hypothesis (image/jpg content type) was wrong — ajemonx confirmed the bug occurs with gallery photos too. The actual fix was changing the account number to 8 digits.

Real root cause: accountNumber is typed as GT.Int (GraphQL 32-bit signed integer, max 2,147,483,647). Jamaican bank accounts can be 10–16 digits. Any number > 2,147,483,647 causes GraphQL type validation to reject the entire request with HTTP 400.

8-digit number worked (max 99,999,999 — within Int32). Longer number failed.

Changes

  • BankAccountInput.accountNumber: GT.IntGT.String
  • BankAccount response type .accountNumber: GT.IntGT.String
  • BankAccount domain type .accountNumber: numberstring

Bank account numbers are identifiers, not integers — String is the correct type.

Paired mobile fix

PR #607 on flash-mobile should also be updated: accountNumber: Number(bankInfo.accountNumber) → pass as string directly. I'll update that PR.

Note

This is a backend schema change — requires Nick or Ben to review and merge before the mobile side can be updated.

Root cause: GraphQL Int is 32-bit signed (max 2,147,483,647). Jamaican
bank account numbers can be 10+ digits, causing Int32 overflow → GraphQL
type validation error → HTTP 400 on account upgrade step 4.

Confirmed by ajemonx: 8-digit number worked (within Int32), longer
number failed. Not a content-type issue.

Changes:
- BankAccountInput.accountNumber: GT.Int → GT.String
- BankAccount (response type).accountNumber: GT.Int → GT.String
- BankAccount domain type.accountNumber: number → string

Bank account numbers are identifiers, not integers. String type:
- Handles all Caribbean bank account lengths (8-16 digits)
- Preserves leading zeros
- No overflow risk

Paired mobile fix: accountNumber: Number(x) → String cast removed.
@linear
Copy link
Copy Markdown

linear bot commented Apr 5, 2026

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.

2 participants