Do gradients flow through operations performed on TensorFlow variables across session.run calls? Persistent graphs?

My understanding is that TensorFlow variables don't do this — is there a way to maintain a partially computed graph persistently across session.run calls?

partial_run stores a partially computed graph, but it can only be used once and is not persistent. Variables on the other hand are persistent, but as far as I'm aware do not store the graph of operations that led up to them.

Just to make my question more clear: if I have a matrix of TensorFlow variables and perform some operations on that matrix (say, using assign or scatter_update), would the operations that led up to the new matrix be stored in the computation graph and allow gradients to flow through?

I'm aware this would make TensorFlow far more dynamic than it probably is.