how to call multiple queries inside relay fragments?

553 views Asked by At
export default Relay.createContainer(Component,{
 initialVariables :{
   state:null
 },
 fragments:{
   store :() => Relay.QL`
    fragment on Store {
      stateInfo(state : $state){     //Repeat taking a state value from a list ["AZ","AK"...}
          name
          area
          population
       }
    }
   `
 }
})

From the Above relay container, I am trying to get state Info of 10 states hitting a webservice which accepts one state ant a time. My Question .

  1. How Do I loop queries inside the fragments accepting one state values , and hit the webservicce and gather response in one shot?
  2. How do I access the response in such scenarios ?
0

There are 0 answers