I have a few react components that mutate my server data and for now I have refetchQueries: [{query:myQuery}]. I need to restructured the data as a map for faster lookup time. How can I accomplish this? In Redux, I would have used reselect and in MobX I would have used @computed. As far as I can tell, apollo doesn't support this functionality yet. I looked into:
- @client directive, but this doesn't work for me since I have to compute the data on the server response.
- reactive variables don't work either since I will have to change the variable everywhere I mutate the data, far from ideal.
There seems to be very little information out there about computed/derived values when using Apollo Client, the only reference I found was this one: Apollo GraphQl Storing derived data