-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REST API vs. GraphQL: Comparison is not fair #99
Comments
Then it stops becoming a REST(ful) design according to the original definition of REST — it's just a custom API design built on top of HTTP. |
I see, we're talking on two different slates, I guess. [Clarification] [Suggestion] [Background] |
I wouldn't say this is philosophical — Agreed that the content should probably provide more clarification (I haven't looked at it in detail, so can't comment specifically). (Note: I'm not associated with this project) |
To doc compares that GraphQL has only one endpoint while REST API has many. It also states that in GraphQL you can select exactly what items from the database you'd like to have.
However, you can write you REST API the exactly same way: Put everything in one endpoint and let the requestee decide on which items they'd like to receive.
Now you might think that "well, then you need to implement all that logic inside the REST API endpoint.", but this is exactly what you need to do for GraphQL.
If this is a trap in order to find out which of the beginners actually paid attention, then I have nothing to complain. In any other case I think the comparison is not fair.
The text was updated successfully, but these errors were encountered: