{"action":"created","comment":{"url":"https://api.github.com/repos/fabienheureux/undefined/pulls/comments/191176000","pull_request_review_id":123698010,"id":191176000,"diff_hunk":"@@ -0,0 +1,31 @@\n+import { createModel } from './Model'\n+import { r as Author } from './Author'\n+\n+export const r: any = createModel('Post')\n+\n+export const Query = {\n+  post: async (_: any, { id }: any) => await r.get(id).run(),\n+\n+  posts: async () => await r.run()\n+}\n+\n+export const Mutation = {\n+  createPost: async (_: any, data: any) =>\n+  await r.save(Object.assign({}, data)),\n+\n+  updatePost: async (_: any, data: any) => {\n+    return await r.get(data.id).updateAt(Object.assign({}, data)).run()\n+  },\n+\n+  deletePost: async (_: any, { id }: any) => {\n+    return await r.get(id).then((post: any) => {\n+      if (post) {\n+        return post.delete()\n+      }\n+    })\n+  }\n+}\n+\n+export const Post = {\n+  author: async (post: any) => await Author.get(post.authorId).run()\n+}","path":"api/data/models/Post.js","position":30,"original_position":31,"commit_id":"9fec7bc4cb0e1e6b7a8f2117c67170bc6d80488a","original_commit_id":"a928de41217af9582006f2620306a7610e656f29","user":{"login":"fabienheureux","id":1702255,"avatar_url":"https://avatars1.githubusercontent.com/u/1702255?v=4","gravatar_id":"","url":"https://api.github.com/users/fabienheureux","html_url":"https://github.com/fabienheureux","followers_url":"https://api.github.com/users/fabienheureux/followers","following_url":"https://api.github.com/users/fabienheureux/following{/other_user}","gists_url":"https://api.github.com/users/fabienheureux/gists{/gist_id}","starred_url":"https://api.github.com/users/fabienheureux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabienheureux/subscriptions","organizations_url":"https://api.github.com/users/fabienheureux/orgs","repos_url":"https://api.github.com/users/fabienheureux/repos","events_url":"https://api.github.com/users/fabienheureux/events{/privacy}","received_events_url":"https://api.github.com/users/fabienheureux/received_events","type":"User","site_admin":false},"body":"https://www.apollographql.com/docs/react/essentials/get-started.html#request\r\nsur ? ","created_at":"2018-05-28T10:48:34Z","updated_at":"2018-05-28T10:48:34Z","html_url":"https://github.com/fabienheureux/undefined/pull/13#discussion_r191176000","pull_request_url":"https://api.github.com/repos/fabienheureux/undefined/pulls/13","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/fabienheureux/undefined/pulls/comments/191176000"},"html":{"href":"https://github.com/fabienheureux/undefined/pull/13#discussion_r191176000"},"pull_request":{"href":"https://api.github.com/repos/fabienheureux/undefined/pulls/13"}},"in_reply_to_id":191143404},"pull_request":{"url":"https://api.github.com/repos/fabienheureux/undefined/pulls/13","id":190739139,"html_url":"https://github.com/fabienheureux/undefined/pull/13","diff_url":"https://github.com/fabienheureux/undefined/pull/13.diff","patch_url":"https://github.com/fabienheureux/undefined/pull/13.patch","issue_url":"https://api.github.com/repos/fabienheureux/undefined/issues/13","number":13,"state":"open","locked":false,"title":"Feat setup graphql db","user":{"login":"fabienheureux","id":1702255,"avatar_url":"https://avatars1.githubusercontent.com/u/1702255?v=4","gravatar_id":"","url":"https://api.github.com/users/fabienheureux","html_url":"https://github.com/fabienheureux","followers_url":"https://api.github.com/users/fabienheureux/followers","following_url":"https://api.github.com/users/fabienheureux/following{/other_user}","gists_url":"https://api.github.com/users/fabienheureux/gists{/gist_id}","starred_url":"https://api.github.com/users/fabienheureux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabienheureux/subscriptions","organizations_url":"https://api.github.com/users/fabienheureux/orgs","repos_url":"https://api.github.com/users/fabienheureux/repos","events_url":"https://api.github.com/users/fabienheureux/events{/privacy}","received_events_url":"https://api.github.com/users/fabienheureux/received_events","type":"User","site_admin":false},"body":"**Status**\r\n- [ ] WIP\r\n- [ ] Needs testing\r\n\r\n**Deploy after merge (delete what needn't be deployed)**\r\n\r\n**Run database migrations (delete if no migration was added)**\r\nYES","created_at":"2018-05-26T12:01:05Z","updated_at":"2018-05-28T10:48:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7680001fffd7df0ec98096d9a70d0d47e56adc15","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fabienheureux/undefined/pulls/13/commits","review_comments_url":"https://api.github.com/repos/fabienheureux/undefined/pulls/13/comments","review_comment_url":"https://api.github.com/repos/fabienheureux/undefined/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fabienheureux/undefined/issues/13/comments","statuses_url":"https://api.github.com/repos/fabienheureux/undefined/statuses/9fec7bc4cb0e1e6b7a8f2117c67170bc6d80488a","head":{"label":"fabienheureux:feat-setup-graphql-db","ref":"feat-setup-graphql-db","sha":"9fec7bc4cb0e1e6b7a8f2117c67170bc6d80488a","user":{"login":"fabienheureux","id":1702255,"avatar_url":"https://avatars1.githubusercontent.com/u/1702255?v=4","gravatar_id":"","url":"https://api.github.com/users/fabienheureux","html_url":"https://github.com/fabienheureux","followers_url":"https://api.github.com/users/fabienheureux/followers","following_url":"https://api.github.com/users/fabienheureux/following{/other_user}","gists_url":"https://api.github.com/users/fabienheureux/gists{/gist_id}","starred_url":"https://api.github.com/users/fabienheureux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabienheureux/subscriptions","organizations_url":"https://api.github.com/users/fabienheureux/orgs","repos_url":"https://api.github.com/users/fabienheureux/repos","events_url":"https://api.github.com/users/fabienheureux/events{/privacy}","received_events_url":"https://api.github.com/users/fabienheureux/received_events","type":"User","site_admin":false},"repo":{"id":134834033,"name":"undefined","full_name":"fabienheureux/undefined","owner":{"login":"fabienheureux","id":1702255,"avatar_url":"https://avatars1.githubusercontent.com/u/1702255?v=4","gravatar_id":"","url":"https://api.github.com/users/fabienheureux","html_url":"https://github.com/fabienheureux","followers_url":"https://api.github.com/users/fabienheureux/followers","following_url":"https://api.github.com/users/fabienheureux/following{/other_user}","gists_url":"https://api.github.com/users/fabienheureux/gists{/gist_id}","starred_url":"https://api.github.com/users/fabienheureux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabienheureux/subscriptions","organizations_url":"https://api.github.com/users/fabienheureux/orgs","repos_url":"https://api.github.com/users/fabienheureux/repos","events_url":"https://api.github.com/users/fabienheureux/events{/privacy}","received_events_url":"https://api.github.com/users/fabienheureux/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fabienheureux/undefined","description":"This is a cool webstie about writing code.","fork":false,"url":"https://api.github.com/repos/fabienheureux/undefined","forks_url":"https://api.github.com/repos/fabienheureux/undefined/forks","keys_url":"https://api.github.com/repos/fabienheureux/undefined/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabienheureux/undefined/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabienheureux/undefined/teams","hooks_url":"https://api.github.com/repos/fabienheureux/undefined/hooks","issue_events_url":"https://api.github.com/repos/fabienheureux/undefined/issues/events{/number}","events_url":"https://api.github.com/repos/fabienheureux/undefined/events","assignees_url":"https://api.github.com/repos/fabienheureux/undefined/assignees{/user}","branches_url":"https://api.github.com/repos/fabienheureux/undefined/branches{/branch}","tags_url":"https://api.github.com/repos/fabienheureux/undefined/tags","blobs_url":"https://api.github.com/repos/fabienheureux/undefined/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabienheureux/undefined/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabienheureux/undefined/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabienheureux/undefined/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabienheureux/undefined/statuses/{sha}","languages_url":"https://api.github.com/repos/fabienheureux/undefined/languages","stargazers_url":"https://api.github.com/repos/fabienheureux/undefined/stargazers","contributors_url":"https://api.github.com/repos/fabienheureux/undefined/contributors","subscribers_url":"https://api.github.com/repos/fabienheureux/undefined/subscribers","subscription_url":"https://api.github.com/repos/fabienheureux/undefined/subscription","commits_url":"https://api.github.com/repos/fabienheureux/undefined/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabienheureux/undefined/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabienheureux/undefined/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabienheureux/undefined/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabienheureux/undefined/contents/{+path}","compare_url":"https://api.github.com/repos/fabienheureux/undefined/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabienheureux/undefined/merges","archive_url":"https://api.github.com/repos/fabienheureux/undefined/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabienheureux/undefined/downloads","issues_url":"https://api.github.com/repos/fabienheureux/undefined/issues{/number}","pulls_url":"https://api.github.com/repos/fabienheureux/undefined/pulls{/number}","milestones_url":"https://api.github.com/repos/fabienheureux/undefined/milestones{/number}","notifications_url":"https://api.github.com/repos/fabienheureux/undefined/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabienheureux/undefined/labels{/name}","releases_url":"https://api.github.com/repos/fabienheureux/undefined/releases{/id}","deployments_url":"https://api.github.com/repos/fabienheureux/undefined/deployments","created_at":"2018-05-25T09:21:46Z","updated_at":"2018-05-25T15:28:33Z","pushed_at":"2018-05-28T10:48:03Z","git_url":"git://github.com/fabienheureux/undefined.git","ssh_url":"git@github.com:fabienheureux/undefined.git","clone_url":"https://github.com/fabienheureux/undefined.git","svn_url":"https://github.com/fabienheureux/undefined","homepage":"https://undefined.cool","size":335,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"fabienheureux:develop","ref":"develop","sha":"1cbaa4b9e628d573992b30ce79784addec178c40","user":{"login":"fabienheureux","id":1702255,"avatar_url":"https://avatars1.githubusercontent.com/u/1702255?v=4","gravatar_id":"","url":"https://api.github.com/users/fabienheureux","html_url":"https://github.com/fabienheureux","followers_url":"https://api.github.com/users/fabienheureux/followers","following_url":"https://api.github.com/users/fabienheureux/following{/other_user}","gists_url":"https://api.github.com/users/fabienheureux/gists{/gist_id}","starred_url":"https://api.github.com/users/fabienheureux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabienheureux/subscriptions","organizations_url":"https://api.github.com/users/fabienheureux/orgs","repos_url":"https://api.github.com/users/fabienheureux/repos","events_url":"https://api.github.com/users/fabienheureux/events{/privacy}","received_events_url":"https://api.github.com/users/fabienheureux/received_events","type":"User","site_admin":false},"repo":{"id":134834033,"name":"undefined","full_name":"fabienheureux/undefined","owner":{"login":"fabienheureux","id":1702255,"avatar_url":"https://avatars1.githubusercontent.com/u/1702255?v=4","gravatar_id":"","url":"https://api.github.com/users/fabienheureux","html_url":"https://github.com/fabienheureux","followers_url":"https://api.github.com/users/fabienheureux/followers","following_url":"https://api.github.com/users/fabienheureux/following{/other_user}","gists_url":"https://api.github.com/users/fabienheureux/gists{/gist_id}","starred_url":"https://api.github.com/users/fabienheureux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabienheureux/subscriptions","organizations_url":"https://api.github.com/users/fabienheureux/orgs","repos_url":"https://api.github.com/users/fabienheureux/repos","events_url":"https://api.github.com/users/fabienheureux/events{/privacy}","received_events_url":"https://api.github.com/users/fabienheureux/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fabienheureux/undefined","description":"This is a cool webstie about writing code.","fork":false,"url":"https://api.github.com/repos/fabienheureux/undefined","forks_url":"https://api.github.com/repos/fabienheureux/undefined/forks","keys_url":"https://api.github.com/repos/fabienheureux/undefined/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabienheureux/undefined/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabienheureux/undefined/teams","hooks_url":"https://api.github.com/repos/fabienheureux/undefined/hooks","issue_events_url":"https://api.github.com/repos/fabienheureux/undefined/issues/events{/number}","events_url":"https://api.github.com/repos/fabienheureux/undefined/events","assignees_url":"https://api.github.com/repos/fabienheureux/undefined/assignees{/user}","branches_url":"https://api.github.com/repos/fabienheureux/undefined/branches{/branch}","tags_url":"https://api.github.com/repos/fabienheureux/undefined/tags","blobs_url":"https://api.github.com/repos/fabienheureux/undefined/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabienheureux/undefined/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabienheureux/undefined/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabienheureux/undefined/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabienheureux/undefined/statuses/{sha}","languages_url":"https://api.github.com/repos/fabienheureux/undefined/languages","stargazers_url":"https://api.github.com/repos/fabienheureux/undefined/stargazers","contributors_url":"https://api.github.com/repos/fabienheureux/undefined/contributors","subscribers_url":"https://api.github.com/repos/fabienheureux/undefined/subscribers","subscription_url":"https://api.github.com/repos/fabienheureux/undefined/subscription","commits_url":"https://api.github.com/repos/fabienheureux/undefined/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabienheureux/undefined/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabienheureux/undefined/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabienheureux/undefined/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabienheureux/undefined/contents/{+path}","compare_url":"https://api.github.com/repos/fabienheureux/undefined/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabienheureux/undefined/merges","archive_url":"https://api.github.com/repos/fabienheureux/undefined/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabienheureux/undefined/downloads","issues_url":"https://api.github.com/repos/fabienheureux/undefined/issues{/number}","pulls_url":"https://api.github.com/repos/fabienheureux/undefined/pulls{/number}","milestones_url":"https://api.github.com/repos/fabienheureux/undefined/milestones{/number}","notifications_url":"https://api.github.com/repos/fabienheureux/undefined/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabienheureux/undefined/labels{/name}","releases_url":"https://api.github.com/repos/fabienheureux/undefined/releases{/id}","deployments_url":"https://api.github.com/repos/fabienheureux/undefined/deployments","created_at":"2018-05-25T09:21:46Z","updated_at":"2018-05-25T15:28:33Z","pushed_at":"2018-05-28T10:48:03Z","git_url":"git://github.com/fabienheureux/undefined.git","ssh_url":"git@github.com:fabienheureux/undefined.git","clone_url":"https://github.com/fabienheureux/undefined.git","svn_url":"https://github.com/fabienheureux/undefined","homepage":"https://undefined.cool","size":335,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/fabienheureux/undefined/pulls/13"},"html":{"href":"https://github.com/fabienheureux/undefined/pull/13"},"issue":{"href":"https://api.github.com/repos/fabienheureux/undefined/issues/13"},"comments":{"href":"https://api.github.com/repos/fabienheureux/undefined/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/fabienheureux/undefined/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/fabienheureux/undefined/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fabienheureux/undefined/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/fabienheureux/undefined/statuses/9fec7bc4cb0e1e6b7a8f2117c67170bc6d80488a"}},"author_association":"OWNER"}}
{"actor":{"display_login":"fabienheureux"}}