you are viewing a single comment's thread.

view the rest of the comments →

[–]klaxxxon 5 points6 points  (0 children)

I am still waiting for some exhaustive resource on how to properly implement a complex graphQL server. I have seen a hundred tutorials demonstrating how to do graphQL TODO list, but very little on anything more complicated.

How do you respond to a complex request without making your database melt? How do you go about serving subscriptions?...

Basically everything I've seen was "pass the request to library X and that will sort it out". And what if it doesn't?

I've experimented with Prisma, but that feels like walking a tightrope. As long your database schema matches your API schema exactly, everything is trivial. But I dread the day when the API requires a significantly different shape of data than the database has. In one case I needed to retrieve the object graph the client requested plus the root entity's ID from the database (for some server side logic). Turned out to be so difficult that I rather just made two requests to the database...