SIGN IN SIGN UP

[ING-437] feat(connections): set connection default via GraphQL (#6017)

## Context

After a customer's connections are created, operators need to choose
which one is the default for its category. This adds that ability over
GraphQL for both integration and payment connections, mirroring the
existing set-payment-method-as-default flow. The REST/API surface is
intentionally left out and will be tackled in a follow-up.

  ## Changes

Add `setIntegrationCustomerAsDefault` and
`setPaymentProviderCustomerAsDefault` GraphQL mutations, each resolving
the connection from a customer id and the connection code, guarded by
the `customers:update`
  permission.
  
Add the services behind them —
`IntegrationCustomers::SetAsDefaultService` and
`PaymentProviderCustomers::SetAsDefaultService` — which flip
`is_default` on the target and clear it on the siblings, under a
per-customer advisory lock. Integration clears only the connections of
the same category (one default per category); payment clears all of the
customer's connections (one default per customer). Only
  `is_default` is written.
  
Expose `is_default` on the connection GraphQL types: add an
`IntegrationCustomer` union over the existing per-provider integration
types with `is_default` on each, and add `is_default` to the provider
customer type. Register two new customer lock scopes and regenerate the
GraphQL schema dump.

Payment only handles provider connections here; the reserved `manual`
connection and the connected/manual/not_connected status are deferred to
a later change.

  ## Testing

Service and mutation specs for both integration and payment, plus the
schema spec. 23 examples, 0 failures.

---------

Co-authored-by: Lovro Colic <lovro.colic.lc@gmail.com>
M
Mario Diniz committed
2b8f5cc99b604bcb5daf01a4ae5b535ea2e10105
Parent: e3bf6fa
Committed by GitHub <noreply@github.com> on 7/29/2026, 12:00:05 PM