{"action":"opened","issue":{"url":"https://api.github.com/repos/apollographql/eslint-plugin-graphql/issues/79","repository_url":"https://api.github.com/repos/apollographql/eslint-plugin-graphql","labels_url":"https://api.github.com/repos/apollographql/eslint-plugin-graphql/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/eslint-plugin-graphql/issues/79/comments","events_url":"https://api.github.com/repos/apollographql/eslint-plugin-graphql/issues/79/events","html_url":"https://github.com/apollographql/eslint-plugin-graphql/issues/79","id":239392453,"number":79,"title":"\"required-fields\" rule crash for InlineFragment","user":{"login":"leethree","id":648142,"avatar_url":"https://avatars0.githubusercontent.com/u/648142?v=3","gravatar_id":"","url":"https://api.github.com/users/leethree","html_url":"https://github.com/leethree","followers_url":"https://api.github.com/users/leethree/followers","following_url":"https://api.github.com/users/leethree/following{/other_user}","gists_url":"https://api.github.com/users/leethree/gists{/gist_id}","starred_url":"https://api.github.com/users/leethree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leethree/subscriptions","organizations_url":"https://api.github.com/users/leethree/orgs","repos_url":"https://api.github.com/users/leethree/repos","events_url":"https://api.github.com/users/leethree/events{/privacy}","received_events_url":"https://api.github.com/users/leethree/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-29T07:44:38Z","updated_at":"2017-06-29T07:44:38Z","closed_at":null,"body":"Eslint crashes when there's a required field along with an inline fragment.\r\n\r\nEslint config:\r\n```json\r\n\"graphql/required-fields\": [\"error\", {\r\n      \"requiredFields\": [\"id\"],\r\n      \"schemaJsonFilepath\": \"./data/schema.json\"\r\n    }]\r\n```\r\n\r\nSchema:\r\n```\r\ninterface Viewer {\r\n  id: ID!\r\n}\r\ntype UserViewer implements Viewer {\r\n  id: ID!\r\n  firstName: String\r\n  lastName: String\r\n}\r\n```\r\n\r\nQuery:\r\n```graphql\r\n{\r\n  viewer {\r\n    ... on UserViewer {\r\n       firstName\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nIntended:\r\n```\r\nerror  'id' field required on 'viewer'\r\n```\r\n\r\nActual:\r\n```\r\nCannot read property 'value' of undefined\r\nTypeError: Cannot read property 'value' of undefined\r\n    at /[...]/node_modules/eslint-plugin-graphql/lib/rules.js:44:26\r\n    at Array.find (native)\r\n    at /[...]/node_modules/eslint-plugin-graphql/lib/rules.js:42:66\r\n[...]\r\n```\r\n"}}
{"actor":{"display_login":"leethree"}}