Backend-for-Frontend (BFF) pattern: one per client or shared?
Julia Nielsen
·551 views
we're dealing with the classic problem of our mobile and web clients hitting the same core APIs, which often leads to bloated responses or inefficient data fetching. the backend for frontend (bff) pattern seems like an obvious solution to tailor data for each client. the debate on our team is whether to build a separate bff for each client type (e.g., web bff, ios bff, android bff) or try to build a more generic bff that uses flags or request headers to adjust responses. the former feels like it could lead to code duplication, while the latter might become a complex monster. alternatively, we've discussed moving to graphql. for those who've adopted graphql extensively, has it effectively replaced the need for multiple bffs by letting clients define their own data needs? keen to hear practical insights.
0 comments