Dynamic Node Type Update in Graph Neural Networks Based on Constraint Violations

Is there a way to dynamically update node types in a Graph Neural Network (GNN) when certain attribute values exceed predefined constraints? I have a graph where each node has a type, but if an attribute violates a constraint, the node’s type should change accordingly. How can this be implemented efficiently within a GNN framework?