Hacker Newsnew | past | comments | ask | show | jobs | submit | Capaj's commentslogin

No it's not. Even if they fixed all the bugs which I doubt the API design is bad.


> It's great for the frontend, but in this case it's awful for the backend.

So what you are saying is it's better to leave this complexity for the frontend developer to handle on the client side? Very wise!


The complexity will always live somewhere. Just because you are a frontend developer, and GraphQL magically makes your life easier, it doesn't mean that complexity is just gone. That backend you're so dismissive of is what powers your site/app, and it needs to be developed and maintained, and has to be performant etc. etc.

And yes, GraphQL makes backend significantly more complex, fragile, and prone to significant performance issues.


> If an ID is required for all queries the docs should say so.

they absolutely should. It's not really needed every time, but when you have a queries with IDs and without-that's when the cache blows up. They even a have a snapshot test for this unfortunate behavior: https://github.com/apollographql/apollo-client/blob/master/p...


> Also IDs aren’t required for cache updates, only the typename.

this is very inacurate. The problem happens when an items is cached with an ID and then another GraphQL request tries to cache it without and ID or vice versa. This is where the apollo-cache-inmemory blows up with an error like this: https://api.media.atlassian.com/file/f82c0ee8-2412-4f1b-8027...

There's even a test for this unfortunate behavior: https://github.com/apollographql/apollo-client/blob/master/p...


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

Search: