I\'m new to Relay, still trying to wrap my head around it. Based on my understanding, Relay ties queries to components. This way, you can say that a component needs to be provid
It's honestly probably easiest to use a separate library. I use Lokka in my node
projects and it's dead-simple and reliable.
// config
const Lokka = require('lokka').Lokka;
const Transport = require('lokka-transport-http').Transport;
const client = new Lokka({
transport: new Transport('http://graphql-swapi.parseapp.com/')
});
// query
client.query(`
{
allFilms {
films {
...${filmInfo}
}
}
}
`).then(result => {
console.log(result.allFilms.films);
});