{"action":"created","issue":{"url":"https://api.github.com/repos/reicheltp/dgraph-client/issues/2","repository_url":"https://api.github.com/repos/reicheltp/dgraph-client","labels_url":"https://api.github.com/repos/reicheltp/dgraph-client/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/reicheltp/dgraph-client/issues/2/comments","events_url":"https://api.github.com/repos/reicheltp/dgraph-client/issues/2/events","html_url":"https://github.com/reicheltp/dgraph-client/issues/2","id":228249883,"number":2,"title":"mutarion query error","user":{"login":"gleba","id":1052840,"avatar_url":"https://avatars3.githubusercontent.com/u/1052840?v=3","gravatar_id":"","url":"https://api.github.com/users/gleba","html_url":"https://github.com/gleba","followers_url":"https://api.github.com/users/gleba/followers","following_url":"https://api.github.com/users/gleba/following{/other_user}","gists_url":"https://api.github.com/users/gleba/gists{/gist_id}","starred_url":"https://api.github.com/users/gleba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gleba/subscriptions","organizations_url":"https://api.github.com/users/gleba/orgs","repos_url":"https://api.github.com/users/gleba/repos","events_url":"https://api.github.com/users/gleba/events{/privacy}","received_events_url":"https://api.github.com/users/gleba/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-12T10:21:20Z","updated_at":"2017-05-12T10:44:33Z","closed_at":null,"body":"The requests with mutations as ` mutation {set{<9963693899913877966> <state> \"4\".}}` \r\nreturned empty and with an error\r\nBut make changes.\r\n\r\nOutput log:\r\n```\r\nresponse:  { name: 'ship', state: 3, _uid_: '9963693899913877966' }\r\nmutation query:  mutation {set{<9963693899913877966> <state> \"4\".}}\r\nmutation query response:  undefined\r\nquery:  query { me(id:9963693899913877966) { name, state, _uid_ } }\r\nTypeError: Cannot read property 'uid' of undefined\r\n    at Object.nodeToObject (...\\dgraph\\converter.js:85:13)\r\n    at run.then.response (...\\dgraph\\index.js:42:32)\r\nquery response:  { me: { _uid_: '9963693899913877966', name: 'ship', state: 4 } }\r\n```\r\n\r\nsource code:\r\n```\r\n    let data: any = {name: \"ship\", state: 3}\r\n    let respone1: any = await client.set(data)\r\n    console.log(\"response: \", respone1)\r\n\r\n    let mq = `mutation {set{<${data._uid_}> <state> \"4\".}}`\r\n    console.log(\"mutation query: \", mq)\r\n    let respone2 = await client.query(mq).catch(console.error)\r\n        .catch(x => console.warn(x))\r\n    console.log(\"mutation query response: \", respone2)\r\n\r\n    let q2 = `query { me(id:${respone1._uid_}) { name, state, _uid_ } }`\r\n    console.log(\"query: \", q2)\r\n    let respone4 = await client.query(q2)\r\n    console.log(\"query response: \", respone4)\r\n```"},"comment":{"url":"https://api.github.com/repos/reicheltp/dgraph-client/issues/comments/301044965","html_url":"https://github.com/reicheltp/dgraph-client/issues/2#issuecomment-301044965","issue_url":"https://api.github.com/repos/reicheltp/dgraph-client/issues/2","id":301044965,"user":{"login":"reicheltp","id":4380869,"avatar_url":"https://avatars2.githubusercontent.com/u/4380869?v=3","gravatar_id":"","url":"https://api.github.com/users/reicheltp","html_url":"https://github.com/reicheltp","followers_url":"https://api.github.com/users/reicheltp/followers","following_url":"https://api.github.com/users/reicheltp/following{/other_user}","gists_url":"https://api.github.com/users/reicheltp/gists{/gist_id}","starred_url":"https://api.github.com/users/reicheltp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reicheltp/subscriptions","organizations_url":"https://api.github.com/users/reicheltp/orgs","repos_url":"https://api.github.com/users/reicheltp/repos","events_url":"https://api.github.com/users/reicheltp/events{/privacy}","received_events_url":"https://api.github.com/users/reicheltp/received_events","type":"User","site_admin":false},"created_at":"2017-05-12T10:44:33Z","updated_at":"2017-05-12T10:44:33Z","body":"Hi @gleba,\r\n\r\nMutation queries are currently not supported, as they send another response as queries. \r\n\r\nBut for now, you can just ignore the error, or modify an existing object by:\r\n```\r\nawait client.set( {_uid_: data._uid_, state: 4} )\r\n```\r\n\r\nBest, Paul"}}
{"actor":{"display_login":"reicheltp"}}