optimistic update for complex data structure - tRPC