{"action":"closed","issue":{"url":"https://api.github.com/repos/apollographql/apollo-client/issues/3577","repository_url":"https://api.github.com/repos/apollographql/apollo-client","labels_url":"https://api.github.com/repos/apollographql/apollo-client/issues/3577/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/apollo-client/issues/3577/comments","events_url":"https://api.github.com/repos/apollographql/apollo-client/issues/3577/events","html_url":"https://github.com/apollographql/apollo-client/issues/3577","id":331947407,"node_id":"MDU6SXNzdWUzMzE5NDc0MDc=","number":3577,"title":"Accessing an unfetched or unimplemented field in a query result gives no warning or error","user":{"login":"bessey","id":708200,"node_id":"MDQ6VXNlcjcwODIwMA==","avatar_url":"https://avatars2.githubusercontent.com/u/708200?v=4","gravatar_id":"","url":"https://api.github.com/users/bessey","html_url":"https://github.com/bessey","followers_url":"https://api.github.com/users/bessey/followers","following_url":"https://api.github.com/users/bessey/following{/other_user}","gists_url":"https://api.github.com/users/bessey/gists{/gist_id}","starred_url":"https://api.github.com/users/bessey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bessey/subscriptions","organizations_url":"https://api.github.com/users/bessey/orgs","repos_url":"https://api.github.com/users/bessey/repos","events_url":"https://api.github.com/users/bessey/events{/privacy}","received_events_url":"https://api.github.com/users/bessey/received_events","type":"User","site_admin":false},"labels":[{"id":354007798,"node_id":"MDU6TGFiZWwzNTQwMDc3OTg=","url":"https://api.github.com/repos/apollographql/apollo-client/labels/feature","name":"feature","color":"a2eeef","default":false},{"id":854172084,"node_id":"MDU6TGFiZWw4NTQxNzIwODQ=","url":"https://api.github.com/repos/apollographql/apollo-client/labels/has-reproduction","name":"has-reproduction","color":"42f44e","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-13T11:07:43Z","updated_at":"2018-07-27T18:01:41Z","closed_at":"2018-07-27T18:01:41Z","author_association":"NONE","body":"**Intended outcome:**\r\n\r\nGiven a schema with a type `User`, who has two fields, `id` and `email`, and a query which fetches `query { user { id } }`, and a component which accesses from the `data` object `data.user.email`, I would expect a warning / error that an unfetched field has been accessed.\r\n\r\nSimilarly, if I were to access a field which _doesn't_ exist on `User`, I would expect a warning / error that the field does not exist.\r\n\r\nThis is the behaviour [Github's Ruby graphql-client exhibits](https://github.com/github/graphql-client/blob/master/guides/unfetched-field-error.md), and it is tremendously useful for catching cases where a query / fragment and its matching component have drifted. This is the kind of amazing thing you can only do with a client side understanding of the schema.\r\n\r\n**Actual outcome:**\r\n\r\nNo warning or error occurs, the view happily returns `undefined` for both cases.\r\n\r\n**How to reproduce the issue:**\r\nExample sandbox\r\nhttps://codesandbox.io/s/l46l3j1ypl\r\n\r\n**Versions**\r\nAll versions that I am aware of, but in this sandbox:\r\n```\r\n    \"apollo-client\": \"1.7.0\",\r\n    \"react\": \"15.6.1\",\r\n    \"react-apollo\": \"1.4.3\",\r\n    \"react-dom\": \"15.6.1\"\r\n```\r\n<!--**Issue Labels**\r\n\r\nWhile not necessary, you can help organize our issues by labeling this issue when you open it.  To add a label automatically, simply [x] mark the appropriate box below:\r\n\r\n- [X] has-reproduction\r\n- [X] feature\r\n- [ ] docs\r\n- [ ] blocking\r\n- [ ] good first issue\r\n\r\nTo add a label not listed above, simply place `/label another-label-name` on a line by itself.\r\n-->\r\n"}}
{"actor":{"display_login":"hwillson"}}