Upgrade statements to new graph traversal context