Re:Why, after 6 years, I'm over GraphQL
by travellingprog on Thursday May 30, 2024 @08:36AM
(#40522945)
TanStack Query (fka React Query) is a REST client similar to Apollo Client, with many of the same pros and cons:
https://tanstack.com/query/latest/docs/framework/react/overv...
[ Parent
| on HN ]
Re:Why, after 6 years, I'm over GraphQL
by WiseWeasel on Thursday May 30, 2024 @10:08AM
(#40523904)
Except it only has a query-based cache, rather than a normalized cache by type name and ID. This means a deeply nested component running a mutation to update an entity can’t update the state of a component a few levels up purely with the response to that mutation, it instead needs to invalidate the cache and cause the parent to requery, much less performant.
Re:Why, after 6 years, I'm over GraphQL
by romanhotsiy on Thursday May 30, 2024 @08:58AM
(#40523129)
We use https://tanstack.com/query/v3 + openapi-based auto-generated SDK.
I would say the DX is pretty much comparable to using Apollo Client.
Re:Why, after 6 years, I'm over GraphQL
by shepherdjerred on Thursday May 30, 2024 @02:12PM
(#40526902)
What do you use to generate your SDK?
Re:Why, after 6 years, I'm over GraphQL
by shepherdjerred on Thursday May 30, 2024 @12:14PM
(#40525405)
TanStack Query isn't a REST client. It's a generic data fetching framework.
You could use TanStack query with GraphQL, Apollo, REST, or any other data source.
Re:Why, after 6 years, I'm over GraphQL
by travellingprog on Thursday May 30, 2024 @12:49PM
(#40525844)
yeah, you're right!