Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah. First you limit the depth of recursion.

Then you limit which objects can nest which other objects, under which circumstances..

Pretty soon -- you have a proscribed set of shapes that you allow... and you've converged on the same solution as achieved in the other direction by the REST API requiring explicit data shape inclusion from the caller.



That’s a slippery slope that I don’t think holds up.

When designing the schema, you keep performance and security in mind.

You need to do the same for REST APIs.

Just because some nodes don’t have edges that connect to some other nodes does not mean you’re back at REST.

The main benefit of graphql in not creating super rigid contracts between the frontend and the backend or between services is maintained.


> and you've converged on the same solution as achieved in the other direction by the REST API requiring explicit data shape inclusion from the caller.

Yes, and with GraphQL you didn't have to invent your own way to represent the syntax and semantics in the query string, and you get to use the GraphQL type system and tooling.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: