{"action":"closed","issue":{"url":"https://api.github.com/repos/relayjs/relay-starter-kit/issues/39","labels_url":"https://api.github.com/repos/relayjs/relay-starter-kit/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/relayjs/relay-starter-kit/issues/39/comments","events_url":"https://api.github.com/repos/relayjs/relay-starter-kit/issues/39/events","html_url":"https://github.com/relayjs/relay-starter-kit/issues/39","id":110886140,"number":39,"title":"react-relay not working with decorated components ?","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":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-11T22:22:43Z","updated_at":"2015-10-11T23:52:30Z","closed_at":"2015-10-11T23:52:30Z","body":"Hello\r\n\r\nI tried to integrate relay into this [react-starter-kit](https://github.com/kriasoft/react-starter-kit) but it seems to be incompatible with the decorators.\r\n\r\nI changed the ContactPage to use relay taken from the [relay-starter-kit](https://github.com/relayjs/relay-starter-kit) see below.\r\n\r\nBut I get the following errors in Chrome when I navigate to it:\r\n\r\n    Unhandled promise rejection Error: Invariant Violation: RelayQL: Unexpected invocation at runtime. Either the Babel transform was not set up, or it failed to identify this call site. Make sure it is being used verbatim as `Relay.QL`.\r\n\r\nIn the compiled `app.js` bundle I can definitely see that the `babelRelayPlugin` compiled the Relay Query!\r\n\r\nI added it to the webpack `config.js` like this:\r\n\r\n    const JS_LOADER = {\r\n      test: /\\.jsx?$/,\r\n      include: [\r\n        path.resolve(__dirname, '../node_modules/react-routing/src'),\r\n        path.resolve(__dirname, '../src'),\r\n      ],\r\n      loader: 'babel-loader',\r\n      query: {stage: 0, plugins: ['../tools/lib/babelRelayPlugin']}\r\n    };\r\n\r\nAnd in `routes.js` I changed it to this:\r\n\r\n    on('/contact', async () => (<Relay.RootContainer Component={ContactPage} route={new ContactRoute()} />));\r\n\r\n\r\nIs this a known limitation, or is there a way to use relay in this starter-kit design?\r\n\r\n\r\n    /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */\r\n    \r\n    import React, { PropTypes, Component } from 'react';\r\n    import Relay from 'react-relay';\r\n    import styles from './ContactPage.css';\r\n    import withStyles from '../../decorators/withStyles';\r\n    \r\n    @withStyles(styles)\r\n    class ContactPage extends Component {\r\n    \r\n      static contextTypes = {\r\n        onSetTitle: PropTypes.func.isRequired,\r\n      };\r\n    \r\n      render() {\r\n        const title = 'Contact Us';\r\n        this.context.onSetTitle(title);\r\n        return (\r\n          <div className=\"ContactPage\">\r\n            <div className=\"ContactPage-container\">\r\n              <h1>{title}</h1>\r\n              <p>...</p>\r\n            </div>\r\n            <h1>Widget list</h1>\r\n            <ul>\r\n              {this.props.viewer.widgets.edges.map(edge =>\r\n                  <li>{edge.node.name} (ID: {edge.node.id})</li>\r\n              )}\r\n            </ul>\r\n          </div>\r\n        );\r\n      }\r\n    \r\n    }\r\n    \r\n    // export default ContactPage;\r\n    \r\n    export default Relay.createContainer(ContactPage, {\r\n      fragments: {\r\n        viewer: () => Relay.QL`\r\n          fragment on User {\r\n            widgets(first: 10) {\r\n              edges {\r\n                node {\r\n                  id,\r\n                  name,\r\n                },\r\n              },\r\n            },\r\n          }\r\n        `,\r\n      },\r\n    });\r\n"}}