re: For me the most important reson of using GraphQL is: One models get big enough, overfetching and underfetching is a real issue

I don't really get why you cannot expose req.query.fields or req.body.fields in a REST API. I think OData is doing that.

Also, this idea integrates well with MongoDB projection.

Also, I don't know how much idempotency matters in GraphQL. (e.g. GET vs POST)


Is idempotency an issue at all given that GraphQL only queries (reads) data? Or am I missing something here?

It has mutations , similar to a POST in old school REST only capable of dynamically handling a subset of the data you CAN post.

Thanks, I didn't know that. The "Query" in QL to me suggested otherwise.


This post might be helpful in understanding the differences: jeffhandley.com/2018-09-13/graphql...

Too long, many links, more of the complaints and telling that the writer is trustworthy; so I still understand nothing.

Not to mention that GraphQL can also be DoS and injected as well.

code of conduct - report abuse