- A modern Android application demonstrating GraphQL integration using Apollo Client, Jetpack Compose, and MVVM architecture pattern.

- GraphQL Integration: Uses Apollo Client for efficient data fetching from the Rick and Morty API
- Modern UI: Built with Jetpack Compose and Material 3 design system
- MVVM Architecture: Clean separation of concerns with ViewModels and Repository pattern
- Navigation: Type-safe navigation between screens using Navigation Compose
- Image Loading: Efficient image loading and caching with Coil
- Error Handling: Comprehensive error handling with retry mechanisms
- Loading States: Proper loading states and skeleton screens
- Filtering: Advanced filtering capabilities for characters
- Responsive Design: Optimized for different screen sizes
The app follows MVVM (Model-View-ViewModel) architecture:
- Model: Data models and repository classes
- View: Jetpack Compose UI components
- ViewModel: State management and business logic
- Repository: Data access layer with GraphQL integration
- Kotlin: Programming language
- Jetpack Compose: Modern UI toolkit
- Apollo GraphQL: GraphQL client
- Navigation Compose: Type-safe navigation
- ViewModel: State management
- Coil: Image loading
- OkHttp: HTTP client
- Coroutines: Asynchronous programming
The app uses the Rick and Morty GraphQL API with the following main queries:
GetCharacters
: Fetches paginated list of characters with filteringGetCharacterById
: Fetches detailed information for a specific characterGetLocations
: Fetches paginated list of locations
CharacterListScreen
: Displays paginated list of characters with filteringCharacterDetailScreen
: Shows detailed character information
CharacterViewModel
: Manages character data state and business logic
CharacterRepository
: Handles GraphQL data fetching and mapping
AppNavigation
: Handles navigation between screens
- Clone the repository
- Open in Android Studio
- Sync Gradle files
- Run the app
The app will automatically fetch and display characters from the Rick and Morty API.
The app uses the public Rick and Morty GraphQL API:
- Base URL:
https://rickandmortyapi.com/graphql
Key dependencies include:
- Apollo GraphQL Client
- Jetpack Compose BOM
- Navigation Compose
- ViewModel Compose
- Coil for image loading
- OkHttp for networking
- Paginated loading with infinite scroll
- Advanced filtering by name, status, and species
- Pull-to-refresh functionality
- Error handling with retry options
- Comprehensive character information
- Origin and location details
- Episode appearances
- High-quality character images
- Network error handling
- Graceful degradation
- Retry mechanisms
- User-friendly error messages
Potential improvements could include:
- Offline support with caching
- Search functionality
- Favorites system
- Dark theme optimization
- Unit and UI tests
- Dependency injection with Hilt