On any GraphObject, and it will work. This is an undocumented GoJS feature.
As a really basic demo:
myDiagram.nodeTemplate = new go.Node("Auto").add(
new go.Shape("RoundedRectangle", { strokeWidth: 0, fill: "white" })
.bind("fill","color")
.bindObject("filter", "isSelected", h => h ? "grayscale(0)" : "grayscale(1)"),
new go.TextBlock().bind('text')
);
Yes, that’s right. That’s why I was suggesting that you set the strokeWidth to zero, or maybe set the stroke to null. Having both a stroke and a fill is causing double-painting, so unless the colors/brushes are different, there’s no reason to have both.