Hacker News new | ask | show | jobs
by dlai 2692 days ago
My understanding looking at the code example is it turns a rest call into a services layer then maps it to GraphQL.

I think this creates a bad convention of creating a service layer dependency on express where it's not needed.

As a proof, I like the idea, but in design I don't like adding extra coupling where it's not needed.

1 comments

One thing I do see that's missing (or maybe just not documented) is the power to specify the exact shape of the response.

One of the power of GraphQl is allowing us to specify how much or how little of the result objects we want. For example, a Blog post on a mobile app might just want only the short synopsis of the comments and the poster's name, while a web view might want the whole comment.