Your mobile BFF now contains pricing logic, entitlement checks and order validation. What has gone wrong?
Show the full answer Hide the answer
What the interviewer is testing
Whether you recognise the characteristic degradation of the BFF pattern and can propose a boundary rule.
What has gone wrong
Business logic migrated into a layer meant to shape data. The BFF was supposed to aggregate, trim and reshape downstream responses for one client. It now makes domain decisions.
The consequences:
Duplicated logic. The web BFF and the mobile BFF now both implement pricing, and they will diverge. The same product will eventually show different prices on different clients, which is a genuine commercial incident.
Wrong ownership. Pricing belongs to the pricing domain, owned by a team accountable for it. It is now maintained by a client team who will not be told when the rules change.
Untested critical logic. BFFs are typically tested as integration glue, not as domain services with edge cases and property tests.
It is no longer a BFF. It is a service with a misleading name and none of a service's ownership and testing expectations.
The fix
Move the logic to the owning domain services and have the BFF call them. If the pricing service cannot answer the question the client needs, that is a gap in the pricing service's API — which is the right place to fix it.
State the boundary rule explicitly: a BFF may aggregate, transform, filter, rename and reshape. It may not decide. If a change to a business rule would require changing the BFF, the logic is in the wrong place.
Enforce it in review, since this drift is gradual and each individual addition looks reasonable — which is precisely why an explicit rule is needed rather than judgement.
What a strong answer adds
Distinguishing legitimate BFF responsibilities that look like logic: client-specific formatting, response composition, caching policy, authentication handling and token exchange, and backwards compatibility shims for old app versions. Those belong there, and confusing them with domain logic produces an equally unhelpful overcorrection.
Common weak answers
Accepting it as pragmatic. Removing the BFF entirely, which restores the over-fetching problem.