AniLink - v3.0.0
    Preparing search index...

    Function isCacheableRequest

    • Whether a request is a cacheable read: a GET, or a GraphQL-protocol POST whose { query, variables } body declares a query operation.

      The AniList transport dispatches every GraphQL document, including queries, as a POST, so a GET-only gate would leave the cache structurally inert for the library's primary provider. Query documents are safe to cache for the same reason GETs are: they are reads whose response is fully determined by the request. The body is part of the cache key. Mutations, including GraphQL mutation documents and REST POST/PUT/DELETE calls, stay excluded so no write is ever served from cache. Internal transport helper: exported for the transport module, not part of the package's public API.

      Parameters

      • method: string

        The HTTP method of the request.

      • Optionaldata: string | object

        The request body, when present.

      Returns boolean

      true when the request is a cacheable read.