{"action":"created","comment":{"url":"https://api.github.com/repos/aerogear/data-sync-ui/pulls/comments/213255935","pull_request_review_id":150052390,"id":213255935,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzI1NTkzNQ==","diff_hunk":"@@ -21,16 +22,26 @@ const DeleteDataSourceDialog = ({\n     const removeDatasource = () => {\n         const { name } = filter;\n         const dataSourceId = dataSource.id;\n+        const queriesToRefetch = [{\n+            query: GetDataSources,\n+            variables: { name }\n+        }, {\n+            query: GetDataSources,\n+            variables: { name: undefined }\n+        }];\n+\n+        if (hasResolvers) {\n+            dataSource.resolvers.forEach(resolver => {\n+                queriesToRefetch.push({","path":"ui/components/data-sources/DeleteDataSourceDialog.js","position":22,"original_position":22,"commit_id":"d4a50cfa36ed953a22dba7d5531b52a9ff63ad0d","original_commit_id":"d4a50cfa36ed953a22dba7d5531b52a9ff63ad0d","user":{"login":"josemigallas","id":11672286,"node_id":"MDQ6VXNlcjExNjcyMjg2","avatar_url":"https://avatars0.githubusercontent.com/u/11672286?v=4","gravatar_id":"","url":"https://api.github.com/users/josemigallas","html_url":"https://github.com/josemigallas","followers_url":"https://api.github.com/users/josemigallas/followers","following_url":"https://api.github.com/users/josemigallas/following{/other_user}","gists_url":"https://api.github.com/users/josemigallas/gists{/gist_id}","starred_url":"https://api.github.com/users/josemigallas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josemigallas/subscriptions","organizations_url":"https://api.github.com/users/josemigallas/orgs","repos_url":"https://api.github.com/users/josemigallas/repos","events_url":"https://api.github.com/users/josemigallas/events{/privacy}","received_events_url":"https://api.github.com/users/josemigallas/received_events","type":"User","site_admin":false},"body":"I think this is a bit overkilling, considering the schemaId and type will be the same in many cases. I wonder if it would be possible to somehow simplify the refetch, something like\r\n```\r\n{\r\n    query: GetResolvers,\r\n    variables: { all: true }\r\n}\r\n```","created_at":"2018-08-28T10:10:00Z","updated_at":"2018-08-28T10:10:00Z","html_url":"https://github.com/aerogear/data-sync-ui/pull/117#discussion_r213255935","pull_request_url":"https://api.github.com/repos/aerogear/data-sync-ui/pulls/117","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aerogear/data-sync-ui/pulls/comments/213255935"},"html":{"href":"https://github.com/aerogear/data-sync-ui/pull/117#discussion_r213255935"},"pull_request":{"href":"https://api.github.com/repos/aerogear/data-sync-ui/pulls/117"}}},"pull_request":{"url":"https://api.github.com/repos/aerogear/data-sync-ui/pulls/117","id":211036479,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMDM2NDc5","html_url":"https://github.com/aerogear/data-sync-ui/pull/117","diff_url":"https://github.com/aerogear/data-sync-ui/pull/117.diff","patch_url":"https://github.com/aerogear/data-sync-ui/pull/117.patch","issue_url":"https://api.github.com/repos/aerogear/data-sync-ui/issues/117","number":117,"state":"open","locked":false,"title":"WIP: Update resolvers after datasource is deleted","user":{"login":"psturc","id":4881144,"node_id":"MDQ6VXNlcjQ4ODExNDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/4881144?v=4","gravatar_id":"","url":"https://api.github.com/users/psturc","html_url":"https://github.com/psturc","followers_url":"https://api.github.com/users/psturc/followers","following_url":"https://api.github.com/users/psturc/following{/other_user}","gists_url":"https://api.github.com/users/psturc/gists{/gist_id}","starred_url":"https://api.github.com/users/psturc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psturc/subscriptions","organizations_url":"https://api.github.com/users/psturc/orgs","repos_url":"https://api.github.com/users/psturc/repos","events_url":"https://api.github.com/users/psturc/events{/privacy}","received_events_url":"https://api.github.com/users/psturc/received_events","type":"User","site_admin":false},"body":"## Motivation\r\nhttps://issues.jboss.org/browse/AEROGEAR-7824\r\n## What\r\n\r\n## Why\r\n\r\n## How\r\n\r\n## Verification Steps\r\n\r\n## Checklist:\r\n\r\n- [ ] Code has been tested locally by PR requester\r\n- [ ] Changes have been successfully verified by another team member \r\n\r\n## Progress\r\n\r\n- [x] Refetching resolvers so deleted ones no longer appear in the list of resolvers\r\n- [ ] If deleted resolver was being edited before deleting, return resolver editor to initial state\r\n\r\n","created_at":"2018-08-27T08:10:44Z","updated_at":"2018-08-28T10:10:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa3ad78bdd553fa0ed6407ff180e9a2ff41566db","assignee":null,"assignees":[],"requested_reviewers":[{"login":"pb82","id":1851198,"node_id":"MDQ6VXNlcjE4NTExOTg=","avatar_url":"https://avatars3.githubusercontent.com/u/1851198?v=4","gravatar_id":"","url":"https://api.github.com/users/pb82","html_url":"https://github.com/pb82","followers_url":"https://api.github.com/users/pb82/followers","following_url":"https://api.github.com/users/pb82/following{/other_user}","gists_url":"https://api.github.com/users/pb82/gists{/gist_id}","starred_url":"https://api.github.com/users/pb82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pb82/subscriptions","organizations_url":"https://api.github.com/users/pb82/orgs","repos_url":"https://api.github.com/users/pb82/repos","events_url":"https://api.github.com/users/pb82/events{/privacy}","received_events_url":"https://api.github.com/users/pb82/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aerogear/data-sync-ui/pulls/117/commits","review_comments_url":"https://api.github.com/repos/aerogear/data-sync-ui/pulls/117/comments","review_comment_url":"https://api.github.com/repos/aerogear/data-sync-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aerogear/data-sync-ui/issues/117/comments","statuses_url":"https://api.github.com/repos/aerogear/data-sync-ui/statuses/d4a50cfa36ed953a22dba7d5531b52a9ff63ad0d","head":{"label":"aerogear:AEROGEAR-7824","ref":"AEROGEAR-7824","sha":"d4a50cfa36ed953a22dba7d5531b52a9ff63ad0d","user":{"login":"aerogear","id":954205,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NDIwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/954205?v=4","gravatar_id":"","url":"https://api.github.com/users/aerogear","html_url":"https://github.com/aerogear","followers_url":"https://api.github.com/users/aerogear/followers","following_url":"https://api.github.com/users/aerogear/following{/other_user}","gists_url":"https://api.github.com/users/aerogear/gists{/gist_id}","starred_url":"https://api.github.com/users/aerogear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerogear/subscriptions","organizations_url":"https://api.github.com/users/aerogear/orgs","repos_url":"https://api.github.com/users/aerogear/repos","events_url":"https://api.github.com/users/aerogear/events{/privacy}","received_events_url":"https://api.github.com/users/aerogear/received_events","type":"Organization","site_admin":false},"repo":{"id":139133264,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkxMzMyNjQ=","name":"data-sync-ui","full_name":"aerogear/data-sync-ui","owner":{"login":"aerogear","id":954205,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NDIwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/954205?v=4","gravatar_id":"","url":"https://api.github.com/users/aerogear","html_url":"https://github.com/aerogear","followers_url":"https://api.github.com/users/aerogear/followers","following_url":"https://api.github.com/users/aerogear/following{/other_user}","gists_url":"https://api.github.com/users/aerogear/gists{/gist_id}","starred_url":"https://api.github.com/users/aerogear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerogear/subscriptions","organizations_url":"https://api.github.com/users/aerogear/orgs","repos_url":"https://api.github.com/users/aerogear/repos","events_url":"https://api.github.com/users/aerogear/events{/privacy}","received_events_url":"https://api.github.com/users/aerogear/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aerogear/data-sync-ui","description":"UI for the AeroGear Data Sync server","fork":false,"url":"https://api.github.com/repos/aerogear/data-sync-ui","forks_url":"https://api.github.com/repos/aerogear/data-sync-ui/forks","keys_url":"https://api.github.com/repos/aerogear/data-sync-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aerogear/data-sync-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aerogear/data-sync-ui/teams","hooks_url":"https://api.github.com/repos/aerogear/data-sync-ui/hooks","issue_events_url":"https://api.github.com/repos/aerogear/data-sync-ui/issues/events{/number}","events_url":"https://api.github.com/repos/aerogear/data-sync-ui/events","assignees_url":"https://api.github.com/repos/aerogear/data-sync-ui/assignees{/user}","branches_url":"https://api.github.com/repos/aerogear/data-sync-ui/branches{/branch}","tags_url":"https://api.github.com/repos/aerogear/data-sync-ui/tags","blobs_url":"https://api.github.com/repos/aerogear/data-sync-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aerogear/data-sync-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aerogear/data-sync-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/aerogear/data-sync-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aerogear/data-sync-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/aerogear/data-sync-ui/languages","stargazers_url":"https://api.github.com/repos/aerogear/data-sync-ui/stargazers","contributors_url":"https://api.github.com/repos/aerogear/data-sync-ui/contributors","subscribers_url":"https://api.github.com/repos/aerogear/data-sync-ui/subscribers","subscription_url":"https://api.github.com/repos/aerogear/data-sync-ui/subscription","commits_url":"https://api.github.com/repos/aerogear/data-sync-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/aerogear/data-sync-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/aerogear/data-sync-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/aerogear/data-sync-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/aerogear/data-sync-ui/contents/{+path}","compare_url":"https://api.github.com/repos/aerogear/data-sync-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aerogear/data-sync-ui/merges","archive_url":"https://api.github.com/repos/aerogear/data-sync-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aerogear/data-sync-ui/downloads","issues_url":"https://api.github.com/repos/aerogear/data-sync-ui/issues{/number}","pulls_url":"https://api.github.com/repos/aerogear/data-sync-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/aerogear/data-sync-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/aerogear/data-sync-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aerogear/data-sync-ui/labels{/name}","releases_url":"https://api.github.com/repos/aerogear/data-sync-ui/releases{/id}","deployments_url":"https://api.github.com/repos/aerogear/data-sync-ui/deployments","created_at":"2018-06-29T09:58:59Z","updated_at":"2018-08-24T18:17:56Z","pushed_at":"2018-08-28T09:47:20Z","git_url":"git://github.com/aerogear/data-sync-ui.git","ssh_url":"git@github.com:aerogear/data-sync-ui.git","clone_url":"https://github.com/aerogear/data-sync-ui.git","svn_url":"https://github.com/aerogear/data-sync-ui","homepage":null,"size":6335,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":10,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"aerogear:master","ref":"master","sha":"49070383356bd65e4a57d3421f6f4c5996bc721e","user":{"login":"aerogear","id":954205,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NDIwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/954205?v=4","gravatar_id":"","url":"https://api.github.com/users/aerogear","html_url":"https://github.com/aerogear","followers_url":"https://api.github.com/users/aerogear/followers","following_url":"https://api.github.com/users/aerogear/following{/other_user}","gists_url":"https://api.github.com/users/aerogear/gists{/gist_id}","starred_url":"https://api.github.com/users/aerogear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerogear/subscriptions","organizations_url":"https://api.github.com/users/aerogear/orgs","repos_url":"https://api.github.com/users/aerogear/repos","events_url":"https://api.github.com/users/aerogear/events{/privacy}","received_events_url":"https://api.github.com/users/aerogear/received_events","type":"Organization","site_admin":false},"repo":{"id":139133264,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkxMzMyNjQ=","name":"data-sync-ui","full_name":"aerogear/data-sync-ui","owner":{"login":"aerogear","id":954205,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NDIwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/954205?v=4","gravatar_id":"","url":"https://api.github.com/users/aerogear","html_url":"https://github.com/aerogear","followers_url":"https://api.github.com/users/aerogear/followers","following_url":"https://api.github.com/users/aerogear/following{/other_user}","gists_url":"https://api.github.com/users/aerogear/gists{/gist_id}","starred_url":"https://api.github.com/users/aerogear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerogear/subscriptions","organizations_url":"https://api.github.com/users/aerogear/orgs","repos_url":"https://api.github.com/users/aerogear/repos","events_url":"https://api.github.com/users/aerogear/events{/privacy}","received_events_url":"https://api.github.com/users/aerogear/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aerogear/data-sync-ui","description":"UI for the AeroGear Data Sync server","fork":false,"url":"https://api.github.com/repos/aerogear/data-sync-ui","forks_url":"https://api.github.com/repos/aerogear/data-sync-ui/forks","keys_url":"https://api.github.com/repos/aerogear/data-sync-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aerogear/data-sync-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aerogear/data-sync-ui/teams","hooks_url":"https://api.github.com/repos/aerogear/data-sync-ui/hooks","issue_events_url":"https://api.github.com/repos/aerogear/data-sync-ui/issues/events{/number}","events_url":"https://api.github.com/repos/aerogear/data-sync-ui/events","assignees_url":"https://api.github.com/repos/aerogear/data-sync-ui/assignees{/user}","branches_url":"https://api.github.com/repos/aerogear/data-sync-ui/branches{/branch}","tags_url":"https://api.github.com/repos/aerogear/data-sync-ui/tags","blobs_url":"https://api.github.com/repos/aerogear/data-sync-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aerogear/data-sync-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aerogear/data-sync-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/aerogear/data-sync-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aerogear/data-sync-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/aerogear/data-sync-ui/languages","stargazers_url":"https://api.github.com/repos/aerogear/data-sync-ui/stargazers","contributors_url":"https://api.github.com/repos/aerogear/data-sync-ui/contributors","subscribers_url":"https://api.github.com/repos/aerogear/data-sync-ui/subscribers","subscription_url":"https://api.github.com/repos/aerogear/data-sync-ui/subscription","commits_url":"https://api.github.com/repos/aerogear/data-sync-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/aerogear/data-sync-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/aerogear/data-sync-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/aerogear/data-sync-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/aerogear/data-sync-ui/contents/{+path}","compare_url":"https://api.github.com/repos/aerogear/data-sync-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aerogear/data-sync-ui/merges","archive_url":"https://api.github.com/repos/aerogear/data-sync-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aerogear/data-sync-ui/downloads","issues_url":"https://api.github.com/repos/aerogear/data-sync-ui/issues{/number}","pulls_url":"https://api.github.com/repos/aerogear/data-sync-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/aerogear/data-sync-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/aerogear/data-sync-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aerogear/data-sync-ui/labels{/name}","releases_url":"https://api.github.com/repos/aerogear/data-sync-ui/releases{/id}","deployments_url":"https://api.github.com/repos/aerogear/data-sync-ui/deployments","created_at":"2018-06-29T09:58:59Z","updated_at":"2018-08-24T18:17:56Z","pushed_at":"2018-08-28T09:47:20Z","git_url":"git://github.com/aerogear/data-sync-ui.git","ssh_url":"git@github.com:aerogear/data-sync-ui.git","clone_url":"https://github.com/aerogear/data-sync-ui.git","svn_url":"https://github.com/aerogear/data-sync-ui","homepage":null,"size":6335,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":10,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aerogear/data-sync-ui/pulls/117"},"html":{"href":"https://github.com/aerogear/data-sync-ui/pull/117"},"issue":{"href":"https://api.github.com/repos/aerogear/data-sync-ui/issues/117"},"comments":{"href":"https://api.github.com/repos/aerogear/data-sync-ui/issues/117/comments"},"review_comments":{"href":"https://api.github.com/repos/aerogear/data-sync-ui/pulls/117/comments"},"review_comment":{"href":"https://api.github.com/repos/aerogear/data-sync-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aerogear/data-sync-ui/pulls/117/commits"},"statuses":{"href":"https://api.github.com/repos/aerogear/data-sync-ui/statuses/d4a50cfa36ed953a22dba7d5531b52a9ff63ad0d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"josemigallas"}}