Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: You Don’t Need GraphQL (gkbrown.org)
1 point by gk_brown 5 months ago | hide | past | web | favorite | 3 comments

You most probably lack experience with GraphQL.

For sure you can create a REST Resource to retrieve all data you need, but what if you need to fetch only some fields, and this differ from a request to another? you will have to perform manual filtering, ... in other words you will reimplement what GraphQL aims to already provide (in a more abstract and clean manner), and this is just a small part of GraphQL.

Also, your observations look wrong. GraphQL is protocol agnostic. You can use an HTTP client to communicate with a GraphQL server. HTTP is even the recommended protocol.

I understand the GraphQL pitch - I just don't buy it. From my experience, you don't generally need that level of flexibility. Most callers probably want the full set of data returned by your API. Those that don't can easily ignore it or filter it out client-side. So GraphQL is basically a big, unnecessary hammer.

Demonstration of how to create a GraphQL-like API using REST.

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact