Skip to content
Maxwell edited this page Jun 18, 2026 · 6 revisions

Overview

Features

  • Automated peristed queries
  • GraphQL fragment resolution (resolves fragment references)
  • Customizable logger (allows you to add a custom logger)
  • Customizable discovery plugin (allows you to define where and how to look for graphql files)

Configuring the sample app

  • Register for an api key for the client, follow this guide
  • After acquiring an api key put it in the follwoing directory ./app/.config/secrets.properties with the following format: token="YOUR_API_TOEKN_KEY_GOES_HERE"

See GraphQL File Uploads if you want to test that too

v2.x Modular Architecture

Starting with v2.x, the library has been split into composable modules. The old :library aggregator is deprecated but still available for backward compatibility. See the Migration Guide for details on upgrading your project.

New capabilities in v2.x:

  • Code Generation Plugin — Replace .graphql files in assets/ with build-time generated types. Apply id("co.anitrend.retrofit.graphql.codegen") to your project.
  • Smaller Footprint — Depend only on the modules your project needs.
  • Registry-Based Resolution — Wire a GraphQLDocumentRegistry into the converter for faster query resolution without asset scanning.

Clone this wiki locally