Replies: 1 comment
-
@kitten sorry for bothering you, but maybe you have some ideas about it? I'll highly appreciate any input |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a relay-based paginated query result set and I would like to create a class instance for every item. I thought to do it in the hook but it will re-create the instance for every item on every re-render which is not so good regarding performance.
So I decided to do it at the upper level - urql query resolvers because it looks like the instances will be created only once and then they just will be returned from the cache as is.
After many tryings I've figured only 1 way how to do it and it's just resolving every dedicated field and every node separatedly because grahql-cache contins pointers only.
Things become even more tough when I need to combine multiple pages together is the pagination args change.
Could someone, please, tell me if I'm doing everything correctly of maybe there is some other, better way which I just don't see.
Thanks for any input!
Beta Was this translation helpful? Give feedback.
All reactions