DEV Community

loading...

Discussion on: Why GraphQL?

Collapse
patarapolw profile image
Pacharapol Withayasakpunt • Edited

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)

Collapse
lifelongthinker profile image
Sebastian

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

Thread Thread
radkin profile image
Noel Miller

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

Thread Thread
lifelongthinker profile image
Sebastian

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

Collapse
saranshk profile image
saransh kataria Author

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

Thread Thread
patarapolw profile image
Pacharapol Withayasakpunt

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.

Forem Open with the Forem app