Optimized BuildGraph in case there are no node/edge attributes