I'm fine for adding the logic here for now (since the state logic is already here), but in the future, we are going to refactor the graph code to remove any component-related specifics.