{"action":"created","issue":{"url":"https://api.github.com/repos/graphql/graphql-js/issues/343","repository_url":"https://api.github.com/repos/graphql/graphql-js","labels_url":"https://api.github.com/repos/graphql/graphql-js/issues/343/labels{/name}","comments_url":"https://api.github.com/repos/graphql/graphql-js/issues/343/comments","events_url":"https://api.github.com/repos/graphql/graphql-js/issues/343/events","html_url":"https://github.com/graphql/graphql-js/pull/343","id":145217947,"number":343,"title":"[RFC] Add flag to tolerate additional properties on input objects.","user":{"login":"glan","id":230373,"avatar_url":"https://avatars.githubusercontent.com/u/230373?v=3","gravatar_id":"","url":"https://api.github.com/users/glan","html_url":"https://github.com/glan","followers_url":"https://api.github.com/users/glan/followers","following_url":"https://api.github.com/users/glan/following{/other_user}","gists_url":"https://api.github.com/users/glan/gists{/gist_id}","starred_url":"https://api.github.com/users/glan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glan/subscriptions","organizations_url":"https://api.github.com/users/glan/orgs","repos_url":"https://api.github.com/users/glan/repos","events_url":"https://api.github.com/users/glan/events{/privacy}","received_events_url":"https://api.github.com/users/glan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-01T15:59:19Z","updated_at":"2016-04-01T15:59:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/graphql/graphql-js/pulls/343","html_url":"https://github.com/graphql/graphql-js/pull/343","diff_url":"https://github.com/graphql/graphql-js/pull/343.diff","patch_url":"https://github.com/graphql/graphql-js/pull/343.patch"},"body":"Adding `tolerateAdditionalProps` property to a GraphQLInputObjectType schema will allow that type to tolerate additional properties which are not specified in the schema.\r\n\r\nExample:\r\n\r\n```js\r\nnew GraphQLInputObjectType({\r\n  name: 'TestFlexInputObject',\r\n  tolerateAdditionalProps: true,\r\n  fields: {\r\n    a: { type: GraphQLString },\r\n    b: { type: new GraphQLList(GraphQLString) },\r\n    c: { type: new GraphQLNonNull(GraphQLString) },\r\n    d: { type: TestComplexScalar },\r\n  }\r\n});\r\n```\r\n\r\nWill accept:\r\n\r\n```\r\n{a: \"foo\", b: [\"bar\"], c: \"baz\", dog: \"dog\"}\r\n```\r\n\r\nNote that the additional properties will still get filtered out but we will not get an error."},"comment":{"url":"https://api.github.com/repos/graphql/graphql-js/issues/comments/204449723","html_url":"https://github.com/graphql/graphql-js/pull/343#issuecomment-204449723","issue_url":"https://api.github.com/repos/graphql/graphql-js/issues/343","id":204449723,"user":{"login":"facebook-github-bot","id":6422482,"avatar_url":"https://avatars.githubusercontent.com/u/6422482?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook-github-bot","html_url":"https://github.com/facebook-github-bot","followers_url":"https://api.github.com/users/facebook-github-bot/followers","following_url":"https://api.github.com/users/facebook-github-bot/following{/other_user}","gists_url":"https://api.github.com/users/facebook-github-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook-github-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook-github-bot/subscriptions","organizations_url":"https://api.github.com/users/facebook-github-bot/orgs","repos_url":"https://api.github.com/users/facebook-github-bot/repos","events_url":"https://api.github.com/users/facebook-github-bot/events{/privacy}","received_events_url":"https://api.github.com/users/facebook-github-bot/received_events","type":"User","site_admin":false},"created_at":"2016-04-01T15:59:49Z","updated_at":"2016-04-01T15:59:49Z","body":"Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!"}}