This utilises the Apollo Android GraphQL library to automatically generate GraphQL files.
Just run ./gradlew jar
and pull the jar out of build/
.
- Download a new schema.json. You can do that using the apollo cli by following the instructions here.
- Update the graphql files with the new queries you'd like classes generated for. Please not that these graphql files are not the same as what is used on the server and have odd syntax. Client-side graphql files are different from what's used server-side. You can see some example syntax here.
- Run
./gradlew generateApolloClasses
. - Feel free to build the jar when ready, deploy to CI, and update the dependent projects.