Loading...
Apollo Android requires your GraphQL server's schema as a schema.json
file. You can obtain the contents of this file by running an introspection query on your server.
The Apollo Gradle plugin exposes a downloadApolloSchema
task to help you obtain your schema. Provide this task your server's GraphQL endpoint and the output location for the schema.json
file:
Tip:
Always remember to replace
API_SECRET
in the Bearer Token andproject-id
in the URL with the correct values from the Apito console.
If you are unsure where to find your API secrets and endpoints for your project, visit this page.
./gradlew downloadApolloSchema \
--endpoint="https://api.apito.io/secured/graphql" \
--schema="app/src/main/graphql/com/example" \
--header="Authorization: Bearer API_SECRET"