Skip to content

src/dazzle_back/graphql/adapters/base.py

Generated: 2026-03-30T04:38:46.285075+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Base external API adapter interface.

Provides a unified interface for wrapping external REST APIs (HMRC, banks, accounting platforms, etc.) for use in the GraphQL BFF layer.

The adapter pattern handles: - Authentication (OAuth, API keys, etc.) - Rate limiting and throttling - Retry logic with expo...

Key Exports

  • RetryConfig
  • RateLimitConfig
  • AdapterConfig
  • AdapterResponse
  • PaginatedResponse
  • AdapterError
  • ApiError
  • AuthenticationError
  • RateLimitError
  • TimeoutError
  • ValidationError
  • AdapterResultStatus
  • AdapterResult
  • BaseExternalAdapter
  • is_success
  • is_error
  • data
  • error
  • response
  • success

Dependencies

Imports

  • __future__.annotations
  • asyncio
  • builtins
  • logging
  • time
  • abc.ABC
  • abc.abstractmethod
  • dataclasses.dataclass
  • dataclasses.field
  • enum.Enum
  • typing.TYPE_CHECKING
  • typing.Any
  • typing.Generic
  • typing.TypeVar
  • collections.abc.Callable
  • dazzle_back.graphql.context.GraphQLContext
  • importlib.util
  • httpx
  • aiohttp
  • json

Event Interactions

None detected.

Invariants and Assumptions

  • Validates: No data available - operation failed
  • Validates: No error - operation succeeded

Tests

  • tests/unit/sentinel/test_base_agent.py
  • tests/unit/test_ux_baseline.py
  • tests/unit/test_ops_database_pg.py
  • tests/unit/test_manifest_database.py
  • tests/unit/test_property_based.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.