The problem is what d.source
and d.target
evaluate to as strings -- [object Object]
. Remember that the force layout replaces the indices you specify in your data with the corresponding node objects when you run it. You are not seeing all the links you are expecting because of this -- the key function returns the same values for different links, hence they are only added once.
To fix, use e.g. the name of the nodes:
var link = svg.selectAll(".link")
.data(graph.links, function(d){ return d.source.name + "_" + d.target.name; });
Complete demo here.