News for hackers. Stuff that matters.
Re:Why not use GraphQL? by acidbaseextract on Saturday November 07, 2020 @05:54PM (#25020485)
But the entities, names, dates, and photo URLs in my database are exactly what I want to show on the frontend, by and large. Maybe a join, aggregation, or something in there.
Re:Why not use GraphQL? by layoric on Saturday November 07, 2020 @07:51PM (#25021615)
Right, but now when you are deciding on a schema change, your front ends clients are going to break because you didn’t create an API, the just allowed db querying from the front end.

Web API contracts are primarily routes and request/response data structures. This allows front end and backend concerns to be separate which allows a lot more flexibility over time for both front end and backend developers. From my limited knowledge of GraphQL, this is still possible but more work than just exposing your db schema types/DTOs.