Ben Gray
Ben Gray
Sep 4, 2018 · 1 min read

Hi, Priya. Great article! It’s quite hard to find info on how to set up relay with react. I’m quite new to GraphQL and relay, but is there perhaps an error in the relay script? I would think that would just echo the schema to the screen, as opposed to saving it to ./src/graphql.schema. Did you intend the following?

"scripts": {
...
"relay": "get-graphql-schema https://api.graph.cool/simple/v1/cjl5kyymsba5a0192mamppugb > ./src/graphql.schema && relay-compiler --src ./src --schema ./src/graphql.schema"
}

    Ben Gray

    Written by

    Ben Gray

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade