{"action":"opened","issue":{"url":"https://api.github.com/repos/graphcool/feature-requests/issues/323","repository_url":"https://api.github.com/repos/graphcool/feature-requests","labels_url":"https://api.github.com/repos/graphcool/feature-requests/issues/323/labels{/name}","comments_url":"https://api.github.com/repos/graphcool/feature-requests/issues/323/comments","events_url":"https://api.github.com/repos/graphcool/feature-requests/issues/323/events","html_url":"https://github.com/graphcool/feature-requests/issues/323","id":244881321,"number":323,"title":"Including type in event.data in RP","user":{"login":"kbrandwijk","id":852069,"avatar_url":"https://avatars1.githubusercontent.com/u/852069?v=4","gravatar_id":"","url":"https://api.github.com/users/kbrandwijk","html_url":"https://github.com/kbrandwijk","followers_url":"https://api.github.com/users/kbrandwijk/followers","following_url":"https://api.github.com/users/kbrandwijk/following{/other_user}","gists_url":"https://api.github.com/users/kbrandwijk/gists{/gist_id}","starred_url":"https://api.github.com/users/kbrandwijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbrandwijk/subscriptions","organizations_url":"https://api.github.com/users/kbrandwijk/orgs","repos_url":"https://api.github.com/users/kbrandwijk/repos","events_url":"https://api.github.com/users/kbrandwijk/events{/privacy}","received_events_url":"https://api.github.com/users/kbrandwijk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-23T01:05:41Z","updated_at":"2017-07-23T01:05:41Z","closed_at":null,"body":"I believe there is an inconsistency in the `event` object used in RP. It does not include the object type. For example, the event type is `PostInput`, yet all of it's properties are directly under `event.data`, instead of `event.data.PostInput`.\r\n\r\nThe reason for asking is that some RP's need to query the Type the RP is defined on. For example, to validate input for a new Post in `TRANSFORM_ARGUMENT`, you might need to query `allPosts`. This *has* to be hardcoded now, because in the RP function, you have no way to determine what type the RP runs for.\r\n\r\nI realize this would be a breaking change, but it would be more consistent with query and mutation results to include the Type in the `data` object."}}
{"actor":{"display_login":"kbrandwijk"}}