Skip to content

A simple project to get experience using graphQL and Apollo

Notifications You must be signed in to change notification settings

Alx-Ryan/Anime-GraphQL

Repository files navigation

AnimeList App

This is a simple SwiftUI project that uses GraphQL and Apollo to fetch anime data from AniList's GraphQL API. The app allows users to view anime sorted by different criteria and displays the top 3 main characters for each anime along with their images.

Features

  • Data Source: Fetches anime data from the AniList GraphQL API using Apollo.
  • Sorting Options: Allows users to sort anime by:
    • Trending
    • Popularity
    • Number of Episodes
  • Anime Details: Displays each anime's:
    • Cover image
    • Title (in English or native language)
    • Top 3 main characters, including their names and images

Screenshots

Technologies Used

  • SwiftUI: For the user interface.
  • Apollo: For making GraphQL queries.
  • AniList GraphQL API: The source of the anime data.

GraphQL Query

The app fetches anime data with the following GraphQL query:

query GetActionAnime($page: Int, $perPage: Int, $sort: [MediaSort]) {
  Page(page: $page, perPage: $perPage) {
    media(genre: "Action", format: TV, sort: $sort) {
      title {
        native
        romaji
        english
      }
      coverImage {
        large
      }
      characters(role: MAIN, perPage: 3) {
        edges {
          node {
            image {
              large
            }
            name {
              first
              native
            }
          }
        }
      }
    }
  }
}

About

A simple project to get experience using graphQL and Apollo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages