How rlalpha49/anilink works
AniLink is a typed TypeScript client for AniList GraphQL and MyAnimeList REST. A caller uses one provider namespace to invoke a typed operation, which dispatches through shared transport behavior to the relevant external API and returns a typed result. The graph preserves AniList queries, paginated queries, mutations, custom requests, and helpers, alongside MAL reads, discovery, forums, and list-status writes. Shared request handling includes caching and resilience. The README supports the provider capabilities; source excerpts confirm request-pipeline behavior but do not show all provider wiring.
Main entry points: requestPipeline.ts Request pipeline · index.ts Operation facade · AniListOperation.ts GraphQL operation · AniLink.ts AniLink client
Components 20
Client API
- AniLink client
src/AniLink.ts - AniList namespace
src/anilist.ts - MAL namespace
src/mal.ts
AniList GraphQL
- Operation facade
src/apis/graphql/anilist/facade/index.ts - Queries and pages
src/apis/graphql/anilist/query - Mutations
src/apis/graphql/anilist/mutation - Custom requests
src/apis/graphql/anilist/CustomRequest.ts - Data helpers
src/apis/graphql/anilist/helpers - Pagination
src/apis/graphql/anilist/Paginator.ts - GraphQL operation
src/apis/graphql/anilist/AniListOperation.ts
MAL REST
- MAL facade
src/apis/rest/mal/facade.ts - MAL operations
src/apis/rest/mal/operations - Pagination
src/apis/rest/mal/Paginator.ts - REST operation
src/apis/rest/RestOperation.ts
Shared transport
- Request pipeline
src/base/requestPipeline.ts - Resilience controls
src/base - Response cache
src/base/responseCache.ts
Other components
- Application
- AniList API
- MyAnimeList API
Connections 22
- Application → AniLink client: creates
- AniLink client → AniList namespace: exposes
- AniLink client → MAL namespace: exposes
- AniList namespace → Operation facade: dispatches via
- Operation facade → Queries and pages: dispatches
- Operation facade → Mutations: dispatches
- Operation facade → Custom requests: dispatches
- Queries and pages → GraphQL operation: executes
- Mutations → GraphQL operation: executes
- Custom requests → GraphQL operation: executes
- Queries and pages → Pagination: supports
- Data helpers → AniList API: maps data
- GraphQL operation → Request pipeline: sends requests
- Request pipeline → AniList API: sends GraphQL
- MAL namespace → MAL facade: dispatches
- MAL facade → MAL operations: dispatches
- MAL operations → REST operation: executes
- MAL operations → Pagination: supports
- REST operation → Request pipeline: sends requests
- Request pipeline → MyAnimeList API: sends REST
- Request pipeline → Response cache: reads and writes
- Request pipeline → Resilience controls: applies