javascript - Envionment with React-Relay GraphQL and Highcharts -


i complete newbie react-relay, , wanted render quick chart using highcharts. have template relay environment

function fetchquery( operation, variables) {  return fetch('/graphql', {     method: 'post',     headers: {         'content-type': 'application/json',     },     body: json.stringify({         query: operation.text,         variables,     }),   }).then(response => {     return response.json()  }); }  //relay environment const modernenvironment = new environment({   network: network.create(fetchquery),   store: new store(new recordsource()), }); 

basically, want data graphql server built, , use display data. know pass environment queryrenderer component, how pass environment

reactdom.render(element, document.getelementbyid('react-app')); 

? element react element create using createelement function in react .. cannot seem find way data graphql, after passing environment, without using queryrenderer... please me?


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -