Hi,
What do you mean by "attribute"?
The attr(name, value) method adds an attribute to the DOM node of the graphic, not to the graphic feature.
So setting feature.attr('something', 123) will result in the graphic dom node to be:
<path something="123" ...></path>
(although I am not sure what types of elements graphics are).
In order to add an attribute to the graphic feature, in the sense of adding a new field, use the setAttributes method.
Filip.