{"action":"created","issue":{"url":"https://api.github.com/repos/jbmusso/gremlin-javascript/issues/65","repository_url":"https://api.github.com/repos/jbmusso/gremlin-javascript","labels_url":"https://api.github.com/repos/jbmusso/gremlin-javascript/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/jbmusso/gremlin-javascript/issues/65/comments","events_url":"https://api.github.com/repos/jbmusso/gremlin-javascript/issues/65/events","html_url":"https://github.com/jbmusso/gremlin-javascript/issues/65","id":189010819,"number":65,"title":"addE() syntax","user":{"login":"batwicket","id":6760834,"avatar_url":"https://avatars.githubusercontent.com/u/6760834?v=3","gravatar_id":"","url":"https://api.github.com/users/batwicket","html_url":"https://github.com/batwicket","followers_url":"https://api.github.com/users/batwicket/followers","following_url":"https://api.github.com/users/batwicket/following{/other_user}","gists_url":"https://api.github.com/users/batwicket/gists{/gist_id}","starred_url":"https://api.github.com/users/batwicket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batwicket/subscriptions","organizations_url":"https://api.github.com/users/batwicket/orgs","repos_url":"https://api.github.com/users/batwicket/repos","events_url":"https://api.github.com/users/batwicket/events{/privacy}","received_events_url":"https://api.github.com/users/batwicket/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-14T01:26:22Z","updated_at":"2016-11-15T03:05:02Z","closed_at":null,"body":"hi..\r\n\r\nI'm trying to add an edge to the graph, but the proper/best addE() usage is eluding me. Probably simple. I'm currently using:\r\n`g.V(${fromVertexId}).addE(${edgelbl}).to(${toVertexId})`\r\n\r\n[gremlin.zip](https://github.com/jbmusso/gremlin-javascript/files/588211/gremlin.zip)\r\n"},"comment":{"url":"https://api.github.com/repos/jbmusso/gremlin-javascript/issues/comments/260534425","html_url":"https://github.com/jbmusso/gremlin-javascript/issues/65#issuecomment-260534425","issue_url":"https://api.github.com/repos/jbmusso/gremlin-javascript/issues/65","id":260534425,"user":{"login":"batwicket","id":6760834,"avatar_url":"https://avatars.githubusercontent.com/u/6760834?v=3","gravatar_id":"","url":"https://api.github.com/users/batwicket","html_url":"https://github.com/batwicket","followers_url":"https://api.github.com/users/batwicket/followers","following_url":"https://api.github.com/users/batwicket/following{/other_user}","gists_url":"https://api.github.com/users/batwicket/gists{/gist_id}","starred_url":"https://api.github.com/users/batwicket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batwicket/subscriptions","organizations_url":"https://api.github.com/users/batwicket/orgs","repos_url":"https://api.github.com/users/batwicket/repos","events_url":"https://api.github.com/users/batwicket/events{/privacy}","received_events_url":"https://api.github.com/users/batwicket/received_events","type":"User","site_admin":false},"created_at":"2016-11-15T03:05:02Z","updated_at":"2016-11-15T03:05:02Z","body":"The gremlin client sets language to gremlin-groovy, and the titan [tutorial](http://s3.thinkaurelius.com/docs/titan/1.0.0/gremlin.html) says it is using that language:\r\n\r\ngremlin> theseus = graph.addVertex('human')\r\n==>v[3328]\r\ngremlin> theseus.property('name', 'theseus')\r\n==>null\r\ngremlin> cerberus = g.V().has('name', 'cerberus').next()\r\n==>v[2816]\r\ngremlin> battle = theseus.addEdge('battled', cerberus, 'time', 22)\r\n==>e[7eo-2kg-iz9-268][3328-battled->2816]\r\n\r\nI tried:\r\n\r\n```\r\n`gremlin`g.addV(label, 'god')\\ntheseus=g.addV(label, 'human')\\ncerberus=g.V().hasLabel('god').next()\\ng.V().count()`\r\n```\r\n\r\nbut the count was 0. The vertices were not created before the count(). So I tried:\r\n\r\n```\r\n    return this.gremlin`cerberus=g.addV(label, 'god').next()`\r\n        .then(() => {\r\n            return this.gremlin`theseus=g.addV(label, 'human')`\r\n        })\r\n        .then(() => {\r\n            return this.gremlin`g.V().count()`;\r\n        })\r\n        .then(count => {\r\n            console.log('count: ', count);\r\n            return this.gremlin`g.V().hasLabel('human').addE('battled', cerberus, 'time', 22)`;\r\n        })\r\n```\r\n\r\nThe count is now ok, but it says 'no such property: cerberus for class: Script62'. \r\n\r\nI've probably missed something.. it seems like it should be a common task. \r\n\r\nPerhaps your other project, gremlin-script, can generate a valid script? "}}
{"actor":{"display_login":"batwicket"}}