An unofficial, read-only Hacker News reader.

The Power of GraphQL, Without GraphQL (opens external site)

64 points by Shoetp 5 days ago | cobalt27.dev | 47 comments on HN

View full thread · View on Hacker News

Comment thread (4)

  1. The more I learn about the "advantages" of these non rest frameworks, the more I think people really don't understand REST. "All that json just for a username".

    REST allows you to specify which fields you want so you can drop what's not needed over the wire.

    Replies (1)
    1. > REST allows you to specify which fields you want so you can drop what's not needed over the wire.

      How? GET doesn't formally allow you to specify what to fetch, QUERY isn't a thing yet, and building an end point for each unique use case doesn't scale well and results in a complicated API.

      Replies (1)
      1. It does through query parameters. There are different implementations where you pass ?fields= , or there's also OData implementations. I don't think it's too much code to implement it.
        Replies (1)
        1. This can be a good approach, but I’ve also seen REST APIs become a shittier ad-hoc version of GraphQL.