Closed nick-stebbings closed 8 months ago
We probably just need a hook that takes care of this functionality and can be triggered from multiple locations
Currently the only place this cacheing happens is in ListOrbits.tsx, and the logic from there can be copied out
ListOrbits.tsx
Code could be copied into a custom React hook that returns the usual data, errors, loading objects so it is easy to swap out for the query
Might be worth looking into if we can hook into the Apollo client to perform this automatically on every createOrbit mutation instead?
createOrbit
We probably just need a hook that takes care of this functionality and can be triggered from multiple locations
Currently the only place this cacheing happens is in
ListOrbits.tsx
, and the logic from there can be copied outCode could be copied into a custom React hook that returns the usual data, errors, loading objects so it is easy to swap out for the query
Might be worth looking into if we can hook into the Apollo client to perform this automatically on every
createOrbit
mutation instead?