       id: node.id
       component: node.component
       metadata: node.metadata
-      graph: @graph.properties.id
+      graph: @graphId
 
   removeNode: (node) =>
     @registerChange 'removenode',
       id: node.id
-      graph: @graph.properties.id
+      graph: @graphId
 
   renameNode: (from, to) =>
     @registerChange 'renamenode',
       from: from
       to: to
-      graph: @graph.properties.id
+      graph: @graphId
 
   changeNode: (node) =>
     key = 'changenode- ' + node.id
     metadata =
       id: node.id
       metadata: node.metadata
-      graph: @graph.properties.id
+      graph: @graphId
     if @changesStates[key] is undefined
       @changesStates[key] = @registerChange 'changenode', metadata
     else

      node: priv.process
      port: priv.port
      metadata: priv.metadata
      graph: @graph.properties.id

  removeOutport: (pub) =>
    @registerChange 'removeoutport',
      public: pub
      graph: @graph.properties.id

  renameOutport: (oldPub, newPub) =>
    @registerChange 'renameoutport',
      from: oldPub
      to: newPub
      graph: @graph.properties.id

  addGroup: (group) =>
    @registerChange 'addgroup',
      name: group.name
      nodes: group.nodes
      metadata: group.metadata
      graph: @graph.properties.id

  removeGroup: (group) =>
    @registerChange 'removegroup',
      name: group.name
      graph: @graph.properties.id

  renameGroup: (oldName, newName) =>
    @registerChange 'renamegroup',
      from: oldName
      to: newName
      graph: @graph.properties.id

  changeGroup: (group, before) =>
    key = 'changegroup-' + group.name
    metadata =
      name: group.name
      metadata: group.metadata
      graph: @graph.properties.id
    if @changesStates[key] is undefined
      @changesStates[key] = @registerChange 'changegroup', metadata
    else

        node: edge.to.node
        port: edge.to.port
      metadata: edge.metadata
      graph: @graphId

  removeEdge: (edge) =>
    @registerChange 'removeedge',
