addNode() and get graph from API