DEV Community

Discussion on: Lessons learned from redesigning our GraphQL API

Collapse
 
supergoteam profile image
supergoteam

I think you might be joking here but of course you can still allow the poor little doggie [Toy] along side favourite toy.

The point of the article I believe is to highlight the benefit of understanding what your consumers want and giving them it directly.

Collapse
 
immsb1138 profile image
immsb1138

The part of this that doesn't make sense to me is that it seems like this article is suggesting that the API be built not only to support one specific consumer, but one specific user interface for one specific consumer. I'm not sure that I ever see situations where it would be a good idea to let one particular user interface dictate the design of an API so directly.

Everyone has different use cases that they are supporting with their work. I'm sure there are cases where this level of direct couplings between the needs of the UI and the API layer would be reasonable, but I wouldn't think it would be the best direction in most cases where an API it's built to expose a business domain for multiple different consumers.

Not that this is an argument for having the database model define the API design either. I'd think the goal should be to allow an understanding of the business domain to guide the API design.