You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forgive me if this is out of scope, or I am missing something here. The problem I am seeking to solve is let's say you have 50 people in a list, and they all have the same creator. The current Ruby GraphQL gem will call resolve and serialze the response 50 times. I've been playing around with this gem a bit and don't notice any difference at all in the performance of caching the result. But, I am also concerned because I don't really want to cache the result after the current request ends, because the data might change and I don't want to have to deal with cache invalidation. I was hoping this gem would allow me to resolve creator (and serialize it, which is where ruby_graphql seems to spend the most time) once.
people {
id
creator {
id
email
}
}
The text was updated successfully, but these errors were encountered:
Hi @raysuelzer! Since you don't want to share cache between requests, you can use batch-loader—it's used to fix N+1 but looks like it should work for your case too: load the user once for all.
Closing the issue since it's out of scope of the gem but feel free to reach out if you need any help with GQL 🙂
Forgive me if this is out of scope, or I am missing something here. The problem I am seeking to solve is let's say you have 50 people in a list, and they all have the same creator. The current Ruby GraphQL gem will call resolve and serialze the response 50 times. I've been playing around with this gem a bit and don't notice any difference at all in the performance of caching the result. But, I am also concerned because I don't really want to cache the result after the current request ends, because the data might change and I don't want to have to deal with cache invalidation. I was hoping this gem would allow me to resolve creator (and serialize it, which is where ruby_graphql seems to spend the most time) once.
The text was updated successfully, but these errors were encountered: