Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

376
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda