use withXXX methods when building graphs with dependencies