-
Hi. I am trying to download a schema.json file from my graphql endpoint set up on Hasura after following the backend tutorial. I need this to generate the Types for my corresponding Typescript frontend application. I am running the following command from the client:
I am getting the following error:
Can you suggest what is wrong or how to download the schema? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
All Sorted. It needed double quotes, not single quotes. apollo service:download --header="x-hasura-admin-key: " --endpoint=https://sample-backend-for-hasura-tutorial.hasura.app/v1/graphql schema.json You will need to escape them if using a script in your package.json file. (") |
Beta Was this translation helpful? Give feedback.
All Sorted.
It needed double quotes, not single quotes.
apollo service:download --header="x-hasura-admin-key: " --endpoint=https://sample-backend-for-hasura-tutorial.hasura.app/v1/graphql schema.json
You will need to escape them if using a script in your package.json file. (")