0

I am trying to get Relay up and running for the first time and have followed the set up guide at https://relay.dev/docs/getting-started/step-by-step-guide/

I have got as far as generating my graphQL file, configuring Relay and now want to run the compiler to generate the schema files. When I do so I am getting the following error:

[ERROR] Failed to read file: `\\?\C:\.....\schema.graphql`.
[ERROR] Compilation failed.
[ERROR] Unable to run relay compiler. Error details:
Failed to read file: `\\?\C:\......\schema.graphql`.

Its reading from the config fine as if I change that to a different filename it errors accordingly and I get the same error even with an empty graphql file, so wondering if its a permission issue as opposed to a graphQL parsing issue, which Id expect to have specified in the error. The graphql file is at the root of my app

My relay config is

"relay": {
"src": "./src/",
"schema": "./schema.graphql",
"language": "javascript"
 }
Stewart Alan
  • 1,521
  • 5
  • 23
  • 45

1 Answers1

0

I don't think the compiler is what generates your schema file, usually your schema will have a url/endpoint that you need to fetch, for example, you would run this script in your terminal:

curl https://ENTER/URL/HERE schema.graphql(or whatever name you specified for "schema" in your relay config)

Hope this helps!