Let a rewriting rule be a couple of first-order formulas $\langle \varphi, \psi \rangle$ such that:
$\varphi$ has $x_1, \dots, x_i$ free variables, and all atomic formulas contain at least one $x$ variable
$\psi$ has $x_1, \dots, x_i$ and $y_1, \dots, y_j$ free variables, all atomic formulas contain at least one $x$ or $y$ variable, all quantifiers are universals (in prefix form)
(there should be a more careful definition, but the example below should clarify the idea).
Basically the $x$ variables capture a subgraph of $G$, and the $y$ variables describe its replacement; in other words we find a subgraph (a set of $v_1,\dots v_i$) matching some tile ($G \models \varphi(v_1,\dots v_i)$), and replace it with another tile, rewiring things along the way (such that the new graph $G' \models \psi(v'_1, \dots v'_j)$ where the $v'$ are the new vertices).
These syntactical constructions allow to express that some vertex $x$ is linked to every other vertex, at least, at most, or exactly $k$ vertices, and can be represented pictorially.
Then we can say that some vertex $y$ is linked to all vertices that pointed to $x$ ($\forall v (x\sim v \leftrightarrow y \sim v)$).
So for example we could have the rule:

The colors allow to identify the links to each variable, the cross the absence of other links, the dots that there may be other edges (technically the cross is redundant). So the meaning of this rule is that find a triple that are all connected such that $x_3$ has no other neighbors, $x_2$ has exactly $1$ other neighbor, and $x_1$ has at least $1$ other neighbor. We replace them by two adjacent vertices $y_1$ and $y_2$, such that $y_1$ is linked to all vertices that were linked to $x_1$ and $y_2$ is adjacent to no other vertex.
Each set of rules given with an initial graph defines a graph language, the set of all graphs that can be obtained by a sequence of rewritings.
Has this notion of graph rewriting be studied in the literature? What would be the closest related systems?