Conversation
## Context ING-466 and ING-467 added the write path for per-object connections on wallets and recurring transaction rules, but nothing read it back. ING-527 needs that routing to render the wallet's external apps tab. ## Description Both surfaces report every category with the behaviour the object holds, and the code of the connection actually in effect. The behaviour is specific, skip, or inherit when the object makes no choice of its own. A client can therefore render the drawer state and a connection chip from one payload, without reimplementing the customer-default cascade. One derivation feeds both: connection_routing on ConnectionResolvable, which loads the overrides once rather than per category, so a preloaded collection stays at a single query. Subscriptions include the same concern, so their read comes with it. GraphQL gains a ConnectionRouting type on the wallet and recurring rule objects. REST gains a connections key on both serializers, shaped like the object already accepted on create and update. Since the wallet webhooks share that serializer, their payloads gain the key too. The wallet index eager-loads the overrides and the customer connection lists the inherited path resolves through, without which the existing N+1 guard fails. The read is deliberately not gated behind multi_connection. The resolution cascade is ungated by design, and with the flag off the read reports the customer default, which is accurate. Gating it would hide true information rather than protect anything.
mariohd
marked this pull request as ready for review
September 14, 2026 16:41
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.
Context
ING-683. ING-466 (REST) and ING-467 (GraphQL) added the write path for per-object connections on wallets and recurring transaction rules, but nothing reads it back. ING-527 needs that routing to render the wallet's "External apps" tab, and ING-667 covers only the invoice snapshot. Branched from
main— the read depends on nothing in those two PRs.Description
Both surfaces report every category with the behaviour the object holds and the code of the connection actually in effect:
inheritmeans the object makes no choice of its own, and thecodethen shows the customer default that applies. That pairing is the point: a client can render the drawer state and a connection chip from one payload, without reimplementing the cascade. The REST shape mirrors the object already accepted on create/update.One derivation feeds both —
ConnectionResolvable#connection_routing, which loads overrides once rather than per category.Subscriptionincludes the same concern, so ING-463's read half is already done at the model layer.The wallet index eager-loads the overrides plus the customer connection lists the inherited path resolves through; without that the existing N+1 guard fails.
Two calls worth a reviewer's eye
Wallet webhooks gain the key.
wallet.created,wallet.updated,wallet.terminatedandwallet.depleted_ongoing_balanceall shareV1::WalletSerializer, so their payloads now carryconnectionsand run the resolution queries. It's additive and consistent withpayment_method, which is also unconditional and also in those payloads — but the alternative is to gate it behindinclude?(:connections)so only the REST endpoints opt in. Happy to switch.The read is not gated behind
multi_connection, contrary to the ticket text. The resolution cascade is ungated by design (ING-456 shipped "ungated, no behaviour change"), and with the flag off the read reports the customer default, which is accurate — gating would hide true information rather than protect anything.Before merging
The ticket asked for the payload shape to be agreed with FE (ING-527 / ING-528) first, and that hasn't happened. If the tab needs the stored override separately from the resolved connection,
ConnectionRoutingchanges shape — cheap now, a breaking change once it's merged and codegen'd.Testing
481 examples, 0 failures. New coverage: the cascade at model level across wallet, rule and subscription (15), a real GraphQL query on the wallet and its nested rules, the REST show endpoint for inherit / specific / skip, and the rule serializer. The GraphQL query matters specifically —
categoryis a String against an enum built from Symbol keys, which would raise at query time if they didn't coerce. The index N+1 guard and the schema-dump spec both pass; Rubocop clean.