Download or Generate GraphQL Schema



If you are using Apollo server on localhost and want to generate or retrieve the schema ( I did this because I needed the schema.json file in my Android project), do the following:

Install Apollo CLI using:

npm install -g apollo

After this is installed, run the following command:

apollo client:download-schema --endpoint=http://localhost:8080

This will download the schema.json file in the present working directory. 

If the endpoint of your server is not localhost, change it to the respective URL.
You may need sudo permission while installing apollo.

Comments

Popular posts from this blog

ADB Cheat Sheet

Capturing Screen of Android Device using ADB

Debugging Android app with ADB command