4 ms·
> It can save you bandwidth. Get what you ask for and no more I don't, and never have believed this argument. I would bet that JSON with Gzip or Zstd is just a
by svnpenn 4y ago
> It can save you bandwidth. Get what you ask for and no more
I don't, and never have believed this argument. I would bet that JSON with Gzip or Zstd is just as small, or close enough that it doesn't matter.
- itsdrewmiller 4y agoIf you have any data sets with an open text field that you don't care about, or where you really only need to get the ID from a wide table, it will definitely save a ton of bandwidth. How often that really matters on the other hand...
- horsawlarway 4y agoAnd in this case usually you can easily opt to exclude the troublesome field with a param, or an endpoint that returns a minimum version of the entity.
- locutous 4y agoNothing prevents you from compressing the smaller response of what you asked for.
- speedgoose 4y agoA graphql query is usually sent inside a JSON document and a graphql response is usually a JSON document sent over HTTP with compression. You do have to upload the query but you can select only the data you need, and you can also do that in a single query compared to a classic almost REST API. That’s the part that saves bandwidth, sometimes.