DEV Community

loading...

Discussion on: 4 reasons why you should use GraphQL over REST APIs

Collapse
nimahkh profile image
Nima Habibkhoda

I am not sure about what you said, in this repository we have cache on graphql : github.com/graph-gophers/graphql-go , it is not about topology , it is about the package that you are using.

Collapse
slavius profile image
Slavius

Do you have stats about hit ratios on your cache? It's most probably trashing. It's enough to swap 2 fields in a model or leave one out and you cannot reuse the cache. Also if you accidentally do not keep the order of fields as they are defined in the database index or add one extra field you cannot use the index and you pay by slow table scan performance. What's the point giving someone all the possible flexibility on the fronted when it results in 99.9% times in performance issues?

Thread Thread
nimahkh profile image
Nima Habibkhoda

I got your point, maybe you can not cache everything 100% because of the huge data in queries, but it is not because of the topology of Graphql. graphql.org/learn/caching/

Some comments have been hidden by the post's author - find out more