{"action":"created","comment":{"url":"https://api.github.com/repos/artsy/exchange/pulls/comments/235568680","pull_request_review_id":177464716,"id":235568680,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTU2ODY4MA==","diff_hunk":"@@ -0,0 +1,20 @@\n+class Mutations::SellerRejectOffer < Mutations::BaseMutation\n+  null true\n+\n+  argument :offer_id, ID, required: true\n+\n+  field :order_or_error, Mutations::OrderOrFailureUnionType, 'A union of success/failure', null: false\n+\n+  def resolve(offer_id:)\n+    offer = Offer.find(offer_id)\n+    order = offer.order\n+\n+    authorize_seller_request!(order)\n+\n+    Offers::RejectOfferService.new(offer: offer, order: order).process!","path":"app/graphql/mutations/seller_reject_offer.rb","position":14,"original_position":14,"commit_id":"3898edf257217d5b8765e691f4b18b2f01e9a5cc","original_commit_id":"3898edf257217d5b8765e691f4b18b2f01e9a5cc","user":{"login":"ashkan18","id":1230819,"node_id":"MDQ6VXNlcjEyMzA4MTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1230819?v=4","gravatar_id":"","url":"https://api.github.com/users/ashkan18","html_url":"https://github.com/ashkan18","followers_url":"https://api.github.com/users/ashkan18/followers","following_url":"https://api.github.com/users/ashkan18/following{/other_user}","gists_url":"https://api.github.com/users/ashkan18/gists{/gist_id}","starred_url":"https://api.github.com/users/ashkan18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashkan18/subscriptions","organizations_url":"https://api.github.com/users/ashkan18/orgs","repos_url":"https://api.github.com/users/ashkan18/repos","events_url":"https://api.github.com/users/ashkan18/events{/privacy}","received_events_url":"https://api.github.com/users/ashkan18/received_events","type":"User","site_admin":false},"body":"i think we can just pass `offer` to this service, I agree with your earlier point about a helper for authorizing the request based on the offer. In the end we may do one extra fetch of order but i think its lazy loaded and should be ok. what do you think?","created_at":"2018-11-21T23:49:40Z","updated_at":"2018-11-21T23:49:41Z","html_url":"https://github.com/artsy/exchange/pull/288#discussion_r235568680","pull_request_url":"https://api.github.com/repos/artsy/exchange/pulls/288","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/artsy/exchange/pulls/comments/235568680"},"html":{"href":"https://github.com/artsy/exchange/pull/288#discussion_r235568680"},"pull_request":{"href":"https://api.github.com/repos/artsy/exchange/pulls/288"}}},"pull_request":{"url":"https://api.github.com/repos/artsy/exchange/pulls/288","id":232701576,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyNzAxNTc2","html_url":"https://github.com/artsy/exchange/pull/288","diff_url":"https://github.com/artsy/exchange/pull/288.diff","patch_url":"https://github.com/artsy/exchange/pull/288.patch","issue_url":"https://api.github.com/repos/artsy/exchange/issues/288","number":288,"state":"open","locked":false,"title":"Reject offer mutation","user":{"login":"sepans","id":687513,"node_id":"MDQ6VXNlcjY4NzUxMw==","avatar_url":"https://avatars3.githubusercontent.com/u/687513?v=4","gravatar_id":"","url":"https://api.github.com/users/sepans","html_url":"https://github.com/sepans","followers_url":"https://api.github.com/users/sepans/followers","following_url":"https://api.github.com/users/sepans/following{/other_user}","gists_url":"https://api.github.com/users/sepans/gists{/gist_id}","starred_url":"https://api.github.com/users/sepans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sepans/subscriptions","organizations_url":"https://api.github.com/users/sepans/orgs","repos_url":"https://api.github.com/users/sepans/repos","events_url":"https://api.github.com/users/sepans/events{/privacy}","received_events_url":"https://api.github.com/users/sepans/received_events","type":"User","site_admin":false},"body":"Adds reject offer mutation.\r\n\r\nFixes [SELL-1179](https://artsyproduct.atlassian.net/browse/SELL-1179)\r\n","created_at":"2018-11-21T15:19:58Z","updated_at":"2018-11-21T23:49:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cce3cf1b7af283096f48a06b07e30eafde46d911","assignee":{"login":"ashkan18","id":1230819,"node_id":"MDQ6VXNlcjEyMzA4MTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1230819?v=4","gravatar_id":"","url":"https://api.github.com/users/ashkan18","html_url":"https://github.com/ashkan18","followers_url":"https://api.github.com/users/ashkan18/followers","following_url":"https://api.github.com/users/ashkan18/following{/other_user}","gists_url":"https://api.github.com/users/ashkan18/gists{/gist_id}","starred_url":"https://api.github.com/users/ashkan18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashkan18/subscriptions","organizations_url":"https://api.github.com/users/ashkan18/orgs","repos_url":"https://api.github.com/users/ashkan18/repos","events_url":"https://api.github.com/users/ashkan18/events{/privacy}","received_events_url":"https://api.github.com/users/ashkan18/received_events","type":"User","site_admin":false},"assignees":[{"login":"ashkan18","id":1230819,"node_id":"MDQ6VXNlcjEyMzA4MTk=","avatar_url":"https://avatars0.githubusercontent.com/u/1230819?v=4","gravatar_id":"","url":"https://api.github.com/users/ashkan18","html_url":"https://github.com/ashkan18","followers_url":"https://api.github.com/users/ashkan18/followers","following_url":"https://api.github.com/users/ashkan18/following{/other_user}","gists_url":"https://api.github.com/users/ashkan18/gists{/gist_id}","starred_url":"https://api.github.com/users/ashkan18/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashkan18/subscriptions","organizations_url":"https://api.github.com/users/ashkan18/orgs","repos_url":"https://api.github.com/users/ashkan18/repos","events_url":"https://api.github.com/users/ashkan18/events{/privacy}","received_events_url":"https://api.github.com/users/ashkan18/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1093494309,"node_id":"MDU6TGFiZWwxMDkzNDk0MzA5","url":"https://api.github.com/repos/artsy/exchange/labels/Jira%20Synced","name":"Jira Synced","color":"0366d6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/artsy/exchange/pulls/288/commits","review_comments_url":"https://api.github.com/repos/artsy/exchange/pulls/288/comments","review_comment_url":"https://api.github.com/repos/artsy/exchange/pulls/comments{/number}","comments_url":"https://api.github.com/repos/artsy/exchange/issues/288/comments","statuses_url":"https://api.github.com/repos/artsy/exchange/statuses/3898edf257217d5b8765e691f4b18b2f01e9a5cc","head":{"label":"sepans:reject-offer","ref":"reject-offer","sha":"3898edf257217d5b8765e691f4b18b2f01e9a5cc","user":{"login":"sepans","id":687513,"node_id":"MDQ6VXNlcjY4NzUxMw==","avatar_url":"https://avatars3.githubusercontent.com/u/687513?v=4","gravatar_id":"","url":"https://api.github.com/users/sepans","html_url":"https://github.com/sepans","followers_url":"https://api.github.com/users/sepans/followers","following_url":"https://api.github.com/users/sepans/following{/other_user}","gists_url":"https://api.github.com/users/sepans/gists{/gist_id}","starred_url":"https://api.github.com/users/sepans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sepans/subscriptions","organizations_url":"https://api.github.com/users/sepans/orgs","repos_url":"https://api.github.com/users/sepans/repos","events_url":"https://api.github.com/users/sepans/events{/privacy}","received_events_url":"https://api.github.com/users/sepans/received_events","type":"User","site_admin":false},"repo":{"id":137755986,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc3NTU5ODY=","name":"exchange","full_name":"sepans/exchange","private":false,"owner":{"login":"sepans","id":687513,"node_id":"MDQ6VXNlcjY4NzUxMw==","avatar_url":"https://avatars3.githubusercontent.com/u/687513?v=4","gravatar_id":"","url":"https://api.github.com/users/sepans","html_url":"https://github.com/sepans","followers_url":"https://api.github.com/users/sepans/followers","following_url":"https://api.github.com/users/sepans/following{/other_user}","gists_url":"https://api.github.com/users/sepans/gists{/gist_id}","starred_url":"https://api.github.com/users/sepans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sepans/subscriptions","organizations_url":"https://api.github.com/users/sepans/orgs","repos_url":"https://api.github.com/users/sepans/repos","events_url":"https://api.github.com/users/sepans/events{/privacy}","received_events_url":"https://api.github.com/users/sepans/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sepans/exchange","description":"Artsy Order Management","fork":true,"url":"https://api.github.com/repos/sepans/exchange","forks_url":"https://api.github.com/repos/sepans/exchange/forks","keys_url":"https://api.github.com/repos/sepans/exchange/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sepans/exchange/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sepans/exchange/teams","hooks_url":"https://api.github.com/repos/sepans/exchange/hooks","issue_events_url":"https://api.github.com/repos/sepans/exchange/issues/events{/number}","events_url":"https://api.github.com/repos/sepans/exchange/events","assignees_url":"https://api.github.com/repos/sepans/exchange/assignees{/user}","branches_url":"https://api.github.com/repos/sepans/exchange/branches{/branch}","tags_url":"https://api.github.com/repos/sepans/exchange/tags","blobs_url":"https://api.github.com/repos/sepans/exchange/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sepans/exchange/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sepans/exchange/git/refs{/sha}","trees_url":"https://api.github.com/repos/sepans/exchange/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sepans/exchange/statuses/{sha}","languages_url":"https://api.github.com/repos/sepans/exchange/languages","stargazers_url":"https://api.github.com/repos/sepans/exchange/stargazers","contributors_url":"https://api.github.com/repos/sepans/exchange/contributors","subscribers_url":"https://api.github.com/repos/sepans/exchange/subscribers","subscription_url":"https://api.github.com/repos/sepans/exchange/subscription","commits_url":"https://api.github.com/repos/sepans/exchange/commits{/sha}","git_commits_url":"https://api.github.com/repos/sepans/exchange/git/commits{/sha}","comments_url":"https://api.github.com/repos/sepans/exchange/comments{/number}","issue_comment_url":"https://api.github.com/repos/sepans/exchange/issues/comments{/number}","contents_url":"https://api.github.com/repos/sepans/exchange/contents/{+path}","compare_url":"https://api.github.com/repos/sepans/exchange/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sepans/exchange/merges","archive_url":"https://api.github.com/repos/sepans/exchange/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sepans/exchange/downloads","issues_url":"https://api.github.com/repos/sepans/exchange/issues{/number}","pulls_url":"https://api.github.com/repos/sepans/exchange/pulls{/number}","milestones_url":"https://api.github.com/repos/sepans/exchange/milestones{/number}","notifications_url":"https://api.github.com/repos/sepans/exchange/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sepans/exchange/labels{/name}","releases_url":"https://api.github.com/repos/sepans/exchange/releases{/id}","deployments_url":"https://api.github.com/repos/sepans/exchange/deployments","created_at":"2018-06-18T13:36:44Z","updated_at":"2018-06-20T20:25:07Z","pushed_at":"2018-11-21T20:18:53Z","git_url":"git://github.com/sepans/exchange.git","ssh_url":"git@github.com:sepans/exchange.git","clone_url":"https://github.com/sepans/exchange.git","svn_url":"https://github.com/sepans/exchange","homepage":"","size":1223,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"artsy:master","ref":"master","sha":"920d2aafeec0801a1713b3ff85851222d447de0e","user":{"login":"artsy","id":546231,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjIzMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/546231?v=4","gravatar_id":"","url":"https://api.github.com/users/artsy","html_url":"https://github.com/artsy","followers_url":"https://api.github.com/users/artsy/followers","following_url":"https://api.github.com/users/artsy/following{/other_user}","gists_url":"https://api.github.com/users/artsy/gists{/gist_id}","starred_url":"https://api.github.com/users/artsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsy/subscriptions","organizations_url":"https://api.github.com/users/artsy/orgs","repos_url":"https://api.github.com/users/artsy/repos","events_url":"https://api.github.com/users/artsy/events{/privacy}","received_events_url":"https://api.github.com/users/artsy/received_events","type":"Organization","site_admin":false},"repo":{"id":136387707,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYzODc3MDc=","name":"exchange","full_name":"artsy/exchange","private":false,"owner":{"login":"artsy","id":546231,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NjIzMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/546231?v=4","gravatar_id":"","url":"https://api.github.com/users/artsy","html_url":"https://github.com/artsy","followers_url":"https://api.github.com/users/artsy/followers","following_url":"https://api.github.com/users/artsy/following{/other_user}","gists_url":"https://api.github.com/users/artsy/gists{/gist_id}","starred_url":"https://api.github.com/users/artsy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artsy/subscriptions","organizations_url":"https://api.github.com/users/artsy/orgs","repos_url":"https://api.github.com/users/artsy/repos","events_url":"https://api.github.com/users/artsy/events{/privacy}","received_events_url":"https://api.github.com/users/artsy/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/artsy/exchange","description":"Artsy Order Management","fork":false,"url":"https://api.github.com/repos/artsy/exchange","forks_url":"https://api.github.com/repos/artsy/exchange/forks","keys_url":"https://api.github.com/repos/artsy/exchange/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artsy/exchange/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artsy/exchange/teams","hooks_url":"https://api.github.com/repos/artsy/exchange/hooks","issue_events_url":"https://api.github.com/repos/artsy/exchange/issues/events{/number}","events_url":"https://api.github.com/repos/artsy/exchange/events","assignees_url":"https://api.github.com/repos/artsy/exchange/assignees{/user}","branches_url":"https://api.github.com/repos/artsy/exchange/branches{/branch}","tags_url":"https://api.github.com/repos/artsy/exchange/tags","blobs_url":"https://api.github.com/repos/artsy/exchange/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artsy/exchange/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artsy/exchange/git/refs{/sha}","trees_url":"https://api.github.com/repos/artsy/exchange/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artsy/exchange/statuses/{sha}","languages_url":"https://api.github.com/repos/artsy/exchange/languages","stargazers_url":"https://api.github.com/repos/artsy/exchange/stargazers","contributors_url":"https://api.github.com/repos/artsy/exchange/contributors","subscribers_url":"https://api.github.com/repos/artsy/exchange/subscribers","subscription_url":"https://api.github.com/repos/artsy/exchange/subscription","commits_url":"https://api.github.com/repos/artsy/exchange/commits{/sha}","git_commits_url":"https://api.github.com/repos/artsy/exchange/git/commits{/sha}","comments_url":"https://api.github.com/repos/artsy/exchange/comments{/number}","issue_comment_url":"https://api.github.com/repos/artsy/exchange/issues/comments{/number}","contents_url":"https://api.github.com/repos/artsy/exchange/contents/{+path}","compare_url":"https://api.github.com/repos/artsy/exchange/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artsy/exchange/merges","archive_url":"https://api.github.com/repos/artsy/exchange/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artsy/exchange/downloads","issues_url":"https://api.github.com/repos/artsy/exchange/issues{/number}","pulls_url":"https://api.github.com/repos/artsy/exchange/pulls{/number}","milestones_url":"https://api.github.com/repos/artsy/exchange/milestones{/number}","notifications_url":"https://api.github.com/repos/artsy/exchange/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artsy/exchange/labels{/name}","releases_url":"https://api.github.com/repos/artsy/exchange/releases{/id}","deployments_url":"https://api.github.com/repos/artsy/exchange/deployments","created_at":"2018-06-06T21:24:37Z","updated_at":"2018-11-21T22:46:40Z","pushed_at":"2018-11-21T23:45:15Z","git_url":"git://github.com/artsy/exchange.git","ssh_url":"git@github.com:artsy/exchange.git","clone_url":"https://github.com/artsy/exchange.git","svn_url":"https://github.com/artsy/exchange","homepage":"","size":1249,"stargazers_count":13,"watchers_count":13,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":22,"open_issues":6,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/artsy/exchange/pulls/288"},"html":{"href":"https://github.com/artsy/exchange/pull/288"},"issue":{"href":"https://api.github.com/repos/artsy/exchange/issues/288"},"comments":{"href":"https://api.github.com/repos/artsy/exchange/issues/288/comments"},"review_comments":{"href":"https://api.github.com/repos/artsy/exchange/pulls/288/comments"},"review_comment":{"href":"https://api.github.com/repos/artsy/exchange/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/artsy/exchange/pulls/288/commits"},"statuses":{"href":"https://api.github.com/repos/artsy/exchange/statuses/3898edf257217d5b8765e691f4b18b2f01e9a5cc"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ashkan18"}}