Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

387
Views
Will my combined graphql queries in apollo-client cache correctly? And if not, how can I make it possible?

My page requests json files from my backend. Often more than 10 files are queried at the same moment. My current setup uses a query that looks like this:

query
{
  someFiles(ids: [ 'id1', 'id2', 'id3', '...' ]
  {
    data
  }
}

My page would greatly benefit from caching these requests. However, I'm not sure if the resulting files will be cached correctly if I request new data with e.g. a different order of ID's. How can I request multiple files at once and still benefit from client side caching of each seperate file/id combination?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

When reading/writing to Apollo Client cache you can use GraphQL fragments to use a more "random access" to your cached data than readQuery/writeQuery, the Apollo doc on Reading and writing data to the cache has more info on readFragment/writeFragment.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!