{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/graphql/issues/83","repository_url":"https://api.github.com/repos/facebook/graphql","labels_url":"https://api.github.com/repos/facebook/graphql/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/facebook/graphql/issues/83/comments","events_url":"https://api.github.com/repos/facebook/graphql/issues/83/events","html_url":"https://github.com/facebook/graphql/pull/83","id":102024952,"number":83,"title":"[RFC] Null value","user":{"login":"leebyron","id":50130,"avatar_url":"https://avatars.githubusercontent.com/u/50130?v=3","gravatar_id":"","url":"https://api.github.com/users/leebyron","html_url":"https://github.com/leebyron","followers_url":"https://api.github.com/users/leebyron/followers","following_url":"https://api.github.com/users/leebyron/following{/other_user}","gists_url":"https://api.github.com/users/leebyron/gists{/gist_id}","starred_url":"https://api.github.com/users/leebyron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leebyron/subscriptions","organizations_url":"https://api.github.com/users/leebyron/orgs","repos_url":"https://api.github.com/users/leebyron/repos","events_url":"https://api.github.com/users/leebyron/events{/privacy}","received_events_url":"https://api.github.com/users/leebyron/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/graphql/labels/CLA%20Signed","name":"CLA Signed","color":"009900"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":34,"created_at":"2015-08-19T23:46:48Z","updated_at":"2016-10-27T15:39:42Z","closed_at":"2016-10-26T16:40:33Z","pull_request":{"url":"https://api.github.com/repos/facebook/graphql/pulls/83","html_url":"https://github.com/facebook/graphql/pull/83","diff_url":"https://github.com/facebook/graphql/pull/83.diff","patch_url":"https://github.com/facebook/graphql/pull/83.patch"},"body":"This proposal adds a null literal to the GraphQL language and allows it to be provided to nullable typed arguments and input object fields.\r\n\r\nThis presents an opportunity for a GraphQL service to interpret the explicitly provided null differently from the implicitly not-provided value, which may be especially useful when performing mutations using a per-field set API.\r\n\r\nFor example, this query may represent the removal/clearing of the \"bar\" field from thing with id: 4.\r\n\r\n```\r\nmutation editThing {\r\n  editThing(id: 4, edits: { foo: \"added\", bar: null }) {\r\n    # ...\r\n  }\r\n}\r\n```\r\n\r\nIn addition to allowing `null` as a literal value, this also proposes interpretting the variables JSON to distinguish between explicit null and implicit not provided:\r\n\r\n```\r\nmutation editThing($edits: EditObj) {\r\n  editThing(id: 4, edits: $edits) {\r\n    # ...\r\n  }\r\n}\r\n```\r\n\r\nThis variables results in the unsetting of `bar`\r\n\r\n```\r\n{ \"edits\": { \"foo\": \"added\", \"bar\": null } }\r\n```\r\n\r\nFinally, this proposes following the not-provided-ness of variables to their positions in arguments and input-obj fields\r\n\r\n```\r\nmutation editThing($editBaz: String) {\r\n  editThing(id: 4, edits: { foo: \"added\", bar: null, baz: $editBaz }) {\r\n    # ...\r\n  }\r\n}\r\n```\r\n\r\nSuch that the three variables are semantically different:\r\n\r\n * `{}` The \"baz\" input field is \"not provided\"\r\n * `{\"editBaz\": null}` The \"baz\" input field is `null`\r\n * `{\"editBaz\": \"added\"}` The \"baz\" input field is `\"added\"`"},"comment":{"url":"https://api.github.com/repos/facebook/graphql/issues/comments/256680078","html_url":"https://github.com/facebook/graphql/pull/83#issuecomment-256680078","issue_url":"https://api.github.com/repos/facebook/graphql/issues/83","id":256680078,"user":{"login":"freiksenet","id":172936,"avatar_url":"https://avatars.githubusercontent.com/u/172936?v=3","gravatar_id":"","url":"https://api.github.com/users/freiksenet","html_url":"https://github.com/freiksenet","followers_url":"https://api.github.com/users/freiksenet/followers","following_url":"https://api.github.com/users/freiksenet/following{/other_user}","gists_url":"https://api.github.com/users/freiksenet/gists{/gist_id}","starred_url":"https://api.github.com/users/freiksenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freiksenet/subscriptions","organizations_url":"https://api.github.com/users/freiksenet/orgs","repos_url":"https://api.github.com/users/freiksenet/repos","events_url":"https://api.github.com/users/freiksenet/events{/privacy}","received_events_url":"https://api.github.com/users/freiksenet/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T15:39:42Z","updated_at":"2016-10-27T15:39:42Z","body":"Party today, null is in :)\n\nOn Wed, Oct 26, 2016, 09:40 Lee Byron <notifications@github.com> wrote:\n\n> Just got a careful review from @dschafer <https://github.com/dschafer>\n> offline - so merging this now.\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/facebook/graphql/pull/83#issuecomment-256407085>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AAKjiN7CpvY38QhBukOMUHXsxbmnSTuDks5q34KTgaJpZM4FuxB0>\n> .\n>\n"}}
{"actor":{"display_login":"freiksenet"}}