0

In one of our projects I'm using urql for graphql api calls. In other projects with RESTful api, I'm using redux to handle re-renders after each data changes.

I'm new in graphql and urql, for this case I should add redux and dispatch actions with new fetched data from urql or is there any trick to connect other components to cached urql data and use them?

Also, I've checked the main docs, but I didn't find any solution for this issue.

thanks

Martin Rützy
  • 415
  • 1
  • 11
  • 22

1 Answers1

-1

You could try to do an update cache after changes in terms of data.

I would highly recommend you to read this, since they have got an clear example:

https://formidable.com/blog/2020/normalized-cache/

https://formidable.com/open-source/urql/docs/graphcache/cache-updates/

Once you did this, your components should always render the correct data.

I hope that this solves your problem.

darksz
  • 115
  • 2
  • 12