AniLink - v3.0.0
    Preparing search index...

    Function isGraphQLDocumentRequest

    • Whether a request carries a GraphQL document body at all, a GraphQL-protocol POST whose body is a { query, variables } object, regardless of whether the document declares a read or a write.

      The transport uses this to route invalidation: a GraphQL document POST that is not a cacheable read (see isCacheableRequest) is a mutation document, and a successful one invalidates every cached GraphQL query at the endpoint (see ResponseCache.deleteAllForUrl). REST POST bodies that happen to carry a query field (for example a search request) never reach this check through the transport: the caller marks them with the REST protocol first.

      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 body is a GraphQL { query, variables } document.