Konstantin Tarkus I followed your example but it didn't work and threw a warning: Failed context…

It looks like you need to pass a relay object like this: {environment: api.environment, variables: {} } in the context of your React component


I have the same issue. I made a very raw fix:

class RelayContextProvider extends React.Component {
getChildContext() {
return {
relay: {
environment: api.environment,
variables: {}

render() {
return this.props.children;
childContextTypes = {
relay: PropTypes.object.isRequired

return {
title: 'title',
component: (
<MyComponent data={data}/>
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.