{"action":"closed","number":267,"pull_request":{"url":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/267","id":86050031,"html_url":"https://github.com/rmosolgo/graphql-ruby/pull/267","diff_url":"https://github.com/rmosolgo/graphql-ruby/pull/267.diff","patch_url":"https://github.com/rmosolgo/graphql-ruby/pull/267.patch","issue_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/267","number":267,"state":"closed","locked":false,"title":"Alternative: Make default_value behavior consistent","user":{"login":"theorygeek","id":7850196,"avatar_url":"https://avatars.githubusercontent.com/u/7850196?v=3","gravatar_id":"","url":"https://api.github.com/users/theorygeek","html_url":"https://github.com/theorygeek","followers_url":"https://api.github.com/users/theorygeek/followers","following_url":"https://api.github.com/users/theorygeek/following{/other_user}","gists_url":"https://api.github.com/users/theorygeek/gists{/gist_id}","starred_url":"https://api.github.com/users/theorygeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theorygeek/subscriptions","organizations_url":"https://api.github.com/users/theorygeek/orgs","repos_url":"https://api.github.com/users/theorygeek/repos","events_url":"https://api.github.com/users/theorygeek/events{/privacy}","received_events_url":"https://api.github.com/users/theorygeek/received_events","type":"User","site_admin":false},"body":"This PR gets at the same problem as https://github.com/rmosolgo/graphql-ruby/pull/266, but it makes arguments behave the way input field's do (instead of vice-versa).\r\n\r\nI think that this ends up being a more natural way to define default values, but some downsides:\r\n- It ends up making validation more complicated. It relies on the `coerce_result` method to detect things like when you have a `String` field and set the default value to `[1, 2, 3]`. But that breaks when you have a list, because list doesn't have a `coerce_result` method.\r\n- This is definitely a breaking change. Perhaps that could be monkey-patched to work correctly?\r\n\r\nTODO:\r\n- [x] Fix the broken tests (ie, by fixing `coerce_result`)","created_at":"2016-09-20T20:27:19Z","updated_at":"2016-09-27T16:40:29Z","closed_at":"2016-09-27T16:40:29Z","merged_at":"2016-09-27T16:40:29Z","merge_commit_sha":"348d98acb2a39dcc8354fb7dbde4418574896f88","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/267/commits","review_comments_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/267/comments","review_comment_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/267/comments","statuses_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/statuses/5a8667d1941a87b1826d93f4dfd6f192bc8bebd6","head":{"label":"goco-inc:alt-consistent-default-values","ref":"alt-consistent-default-values","sha":"5a8667d1941a87b1826d93f4dfd6f192bc8bebd6","user":{"login":"goco-inc","id":10982783,"avatar_url":"https://avatars.githubusercontent.com/u/10982783?v=3","gravatar_id":"","url":"https://api.github.com/users/goco-inc","html_url":"https://github.com/goco-inc","followers_url":"https://api.github.com/users/goco-inc/followers","following_url":"https://api.github.com/users/goco-inc/following{/other_user}","gists_url":"https://api.github.com/users/goco-inc/gists{/gist_id}","starred_url":"https://api.github.com/users/goco-inc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goco-inc/subscriptions","organizations_url":"https://api.github.com/users/goco-inc/orgs","repos_url":"https://api.github.com/users/goco-inc/repos","events_url":"https://api.github.com/users/goco-inc/events{/privacy}","received_events_url":"https://api.github.com/users/goco-inc/received_events","type":"Organization","site_admin":false},"repo":{"id":52611150,"name":"graphql-ruby","full_name":"goco-inc/graphql-ruby","owner":{"login":"goco-inc","id":10982783,"avatar_url":"https://avatars.githubusercontent.com/u/10982783?v=3","gravatar_id":"","url":"https://api.github.com/users/goco-inc","html_url":"https://github.com/goco-inc","followers_url":"https://api.github.com/users/goco-inc/followers","following_url":"https://api.github.com/users/goco-inc/following{/other_user}","gists_url":"https://api.github.com/users/goco-inc/gists{/gist_id}","starred_url":"https://api.github.com/users/goco-inc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goco-inc/subscriptions","organizations_url":"https://api.github.com/users/goco-inc/orgs","repos_url":"https://api.github.com/users/goco-inc/repos","events_url":"https://api.github.com/users/goco-inc/events{/privacy}","received_events_url":"https://api.github.com/users/goco-inc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/goco-inc/graphql-ruby","description":"Ruby implementation of Facebook's GraphQL ","fork":true,"url":"https://api.github.com/repos/goco-inc/graphql-ruby","forks_url":"https://api.github.com/repos/goco-inc/graphql-ruby/forks","keys_url":"https://api.github.com/repos/goco-inc/graphql-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/goco-inc/graphql-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/goco-inc/graphql-ruby/teams","hooks_url":"https://api.github.com/repos/goco-inc/graphql-ruby/hooks","issue_events_url":"https://api.github.com/repos/goco-inc/graphql-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/goco-inc/graphql-ruby/events","assignees_url":"https://api.github.com/repos/goco-inc/graphql-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/goco-inc/graphql-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/goco-inc/graphql-ruby/tags","blobs_url":"https://api.github.com/repos/goco-inc/graphql-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/goco-inc/graphql-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/goco-inc/graphql-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/goco-inc/graphql-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/goco-inc/graphql-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/goco-inc/graphql-ruby/languages","stargazers_url":"https://api.github.com/repos/goco-inc/graphql-ruby/stargazers","contributors_url":"https://api.github.com/repos/goco-inc/graphql-ruby/contributors","subscribers_url":"https://api.github.com/repos/goco-inc/graphql-ruby/subscribers","subscription_url":"https://api.github.com/repos/goco-inc/graphql-ruby/subscription","commits_url":"https://api.github.com/repos/goco-inc/graphql-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/goco-inc/graphql-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/goco-inc/graphql-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/goco-inc/graphql-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/goco-inc/graphql-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/goco-inc/graphql-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/goco-inc/graphql-ruby/merges","archive_url":"https://api.github.com/repos/goco-inc/graphql-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/goco-inc/graphql-ruby/downloads","issues_url":"https://api.github.com/repos/goco-inc/graphql-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/goco-inc/graphql-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/goco-inc/graphql-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/goco-inc/graphql-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/goco-inc/graphql-ruby/labels{/name}","releases_url":"https://api.github.com/repos/goco-inc/graphql-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/goco-inc/graphql-ruby/deployments","created_at":"2016-02-26T14:50:57Z","updated_at":"2016-02-26T14:50:58Z","pushed_at":"2016-09-26T19:50:31Z","git_url":"git://github.com/goco-inc/graphql-ruby.git","ssh_url":"git@github.com:goco-inc/graphql-ruby.git","clone_url":"https://github.com/goco-inc/graphql-ruby.git","svn_url":"https://github.com/goco-inc/graphql-ruby","homepage":"","size":1925,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rmosolgo:master","ref":"master","sha":"74c31bc3e80cbd4ce6454ec926761506915692ea","user":{"login":"rmosolgo","id":2231765,"avatar_url":"https://avatars.githubusercontent.com/u/2231765?v=3","gravatar_id":"","url":"https://api.github.com/users/rmosolgo","html_url":"https://github.com/rmosolgo","followers_url":"https://api.github.com/users/rmosolgo/followers","following_url":"https://api.github.com/users/rmosolgo/following{/other_user}","gists_url":"https://api.github.com/users/rmosolgo/gists{/gist_id}","starred_url":"https://api.github.com/users/rmosolgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmosolgo/subscriptions","organizations_url":"https://api.github.com/users/rmosolgo/orgs","repos_url":"https://api.github.com/users/rmosolgo/repos","events_url":"https://api.github.com/users/rmosolgo/events{/privacy}","received_events_url":"https://api.github.com/users/rmosolgo/received_events","type":"User","site_admin":false},"repo":{"id":30337170,"name":"graphql-ruby","full_name":"rmosolgo/graphql-ruby","owner":{"login":"rmosolgo","id":2231765,"avatar_url":"https://avatars.githubusercontent.com/u/2231765?v=3","gravatar_id":"","url":"https://api.github.com/users/rmosolgo","html_url":"https://github.com/rmosolgo","followers_url":"https://api.github.com/users/rmosolgo/followers","following_url":"https://api.github.com/users/rmosolgo/following{/other_user}","gists_url":"https://api.github.com/users/rmosolgo/gists{/gist_id}","starred_url":"https://api.github.com/users/rmosolgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmosolgo/subscriptions","organizations_url":"https://api.github.com/users/rmosolgo/orgs","repos_url":"https://api.github.com/users/rmosolgo/repos","events_url":"https://api.github.com/users/rmosolgo/events{/privacy}","received_events_url":"https://api.github.com/users/rmosolgo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rmosolgo/graphql-ruby","description":"Ruby implementation of Facebook's GraphQL ","fork":false,"url":"https://api.github.com/repos/rmosolgo/graphql-ruby","forks_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/forks","keys_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/teams","hooks_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/hooks","issue_events_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/events","assignees_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/tags","blobs_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/languages","stargazers_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/stargazers","contributors_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/contributors","subscribers_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/subscribers","subscription_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/subscription","commits_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/merges","archive_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/downloads","issues_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/labels{/name}","releases_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/rmosolgo/graphql-ruby/deployments","created_at":"2015-02-05T04:11:22Z","updated_at":"2016-09-27T12:18:28Z","pushed_at":"2016-09-27T16:40:29Z","git_url":"git://github.com/rmosolgo/graphql-ruby.git","ssh_url":"git@github.com:rmosolgo/graphql-ruby.git","clone_url":"https://github.com/rmosolgo/graphql-ruby.git","svn_url":"https://github.com/rmosolgo/graphql-ruby","homepage":"","size":2222,"stargazers_count":1054,"watchers_count":1054,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":90,"mirror_url":null,"open_issues_count":23,"forks":90,"open_issues":23,"watchers":1054,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/267"},"html":{"href":"https://github.com/rmosolgo/graphql-ruby/pull/267"},"issue":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/267"},"comments":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/issues/267/comments"},"review_comments":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/267/comments"},"review_comment":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/pulls/267/commits"},"statuses":{"href":"https://api.github.com/repos/rmosolgo/graphql-ruby/statuses/5a8667d1941a87b1826d93f4dfd6f192bc8bebd6"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"rmosolgo","id":2231765,"avatar_url":"https://avatars.githubusercontent.com/u/2231765?v=3","gravatar_id":"","url":"https://api.github.com/users/rmosolgo","html_url":"https://github.com/rmosolgo","followers_url":"https://api.github.com/users/rmosolgo/followers","following_url":"https://api.github.com/users/rmosolgo/following{/other_user}","gists_url":"https://api.github.com/users/rmosolgo/gists{/gist_id}","starred_url":"https://api.github.com/users/rmosolgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmosolgo/subscriptions","organizations_url":"https://api.github.com/users/rmosolgo/orgs","repos_url":"https://api.github.com/users/rmosolgo/repos","events_url":"https://api.github.com/users/rmosolgo/events{/privacy}","received_events_url":"https://api.github.com/users/rmosolgo/received_events","type":"User","site_admin":false},"comments":7,"review_comments":14,"commits":11,"additions":110,"deletions":31,"changed_files":15}}
{"actor":{"display_login":"rmosolgo"}}