{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/relay/issues/635","labels_url":"https://api.github.com/repos/facebook/relay/issues/635/labels{/name}","comments_url":"https://api.github.com/repos/facebook/relay/issues/635/comments","events_url":"https://api.github.com/repos/facebook/relay/issues/635/events","html_url":"https://github.com/facebook/relay/issues/635","id":119381130,"number":635,"title":"[babel-relay-plugin] v4+ Uncaught TypeError: Cannot read property 'length' of undefined","user":{"login":"BerndWessels","id":1776695,"avatar_url":"https://avatars.githubusercontent.com/u/1776695?v=3","gravatar_id":"","url":"https://api.github.com/users/BerndWessels","html_url":"https://github.com/BerndWessels","followers_url":"https://api.github.com/users/BerndWessels/followers","following_url":"https://api.github.com/users/BerndWessels/following{/other_user}","gists_url":"https://api.github.com/users/BerndWessels/gists{/gist_id}","starred_url":"https://api.github.com/users/BerndWessels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BerndWessels/subscriptions","organizations_url":"https://api.github.com/users/BerndWessels/orgs","repos_url":"https://api.github.com/users/BerndWessels/repos","events_url":"https://api.github.com/users/BerndWessels/events{/privacy}","received_events_url":"https://api.github.com/users/BerndWessels/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-29T19:34:30Z","updated_at":"2015-11-29T19:34:30Z","closed_at":null,"body":"Hello\r\nI have a problem when upgrading from `babel-relay-plugin` `0.3.0` to `0.4.x`.\r\n\r\nWith `0.3.0` everything works just fine but with `0.4.x` I get this error in Chrome:\r\n\r\n`Uncaught TypeError: Cannot read property 'length' of undefined`\r\n\r\nrelay.0.4.0.js in line 5394\r\n\r\n`if (GraphQL.isQuery(node) && node.fragments.length === 0) {`\r\n\r\nThe problem is that the `node` object does not have a fragments property.\r\n\r\n![relay040](https://cloud.githubusercontent.com/assets/1776695/11459451/aa8a02f0-973b-11e5-9a33-a269e50781bd.png)\r\n\r\nYou can easily reproduce it yourself with my [Git Repo](https://github.com/BerndWessels/react-webpack).\r\n\r\nTo reproduce just change from\r\n`\"babel-relay-plugin-loader\": \"^0.3.0\"`\r\nto\r\n`\"babel-relay-plugin-loader\": \"^0.4.0\"`\r\n\r\nthen run\r\n`npm install`\r\nthen in one console run\r\n`npm run schema:serve`\r\nand in another console run\r\n`npm start`\r\n\r\nNow you will see the error in the Chrome DevTools.\r\n\r\nThank you\r\nBernd"}}