Your script results in the following output:
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<graph id="G" edgedefault="directed">
<node id="a">
</node>
<node id="b">
</node>
<node id="c">
</node>
<node id="d">
</node>
<edge source="a" target="b">
</edge>
<edge source="b" target="c">
</edge>
<edge source="c" target="d">
</edge>
<edge source="d" target="a">
</edge>
<edge source="d" target="b">
</edge>
</graph>
</graphml>
So, Graph::Easy uses 'a', 'b', 'c', and 'd' as unique identifiers for nodes. In GraphML (and in yEd's dialect of GraphML specifically) there is a difference between a node's unique identifier and its text labels. Text labels are part of the visualization data associated to a node. E.g. the simplest way to display the label 'a' for a node looks like this:
<graphml
xmlns="http://graphml.graphdrawing.org/xmlns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:y="http://www.yworks.com/xml/graphml"
xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd">
<key for="node" id="d0" yfiles.type="nodegraphics"/>
<graph id="G" edgedefault="directed">
<node id="a">
<data key="d0">
<y:ShapeNode>
<y:NodeLabel>a</y:NodeLabel>
</y:ShapeNode>
</data>
</node>
</graph>
</graphml>
(Note: The <y:NodeLabel> element may have any text content and you may have several such elements in a <y:ShapeNode> element).
If you use
print $g->as_graphml( format => 'yED' );
instead of
print $g->as_graphml();
Graph::Easy v0.72 will automatically add the necessary y namespace declaration
xmlns:y="http://www.yworks.com/xml/graphml"
Unfortunately, I have no idea how (or even if) it is possible to specify attributes with custom types (as required for yfiles.type="nodegraphics") in Graph::Easy.
However, Graph::Easy does support simple attributes. A simple attribute for node a is set like so:
$a->set_attribute('label', 'label text');
yEd can read these simple attributes. After opening your GraphML in yEd, select one node, go to the properties table in yEd's lower right corner, and find the "Data" section. Aside fron the default attributes URL and Description, this section should also contain a corresponding "label" property.
After you have verified that your custom data was properly imported, use yEd's properties mapper to map the label property to your node's label text.
Alternatively, you can use XSLT to transform your Graph:Easy generated GraphML with simple attributes into yEd's specific GraphML dialect.