Build graph with stack based async-traversal