Skip to content

v1.23.0 "The Interpreter"

Choose a tag to compare

@CarlosGude CarlosGude released this 06 Jun 20:49
· 312 commits to main since this release

CHANGELOG — v1.23.0 "The Interpreter"
Core

Added ClientAdapterInterface — extends ClientInterface with getClientType(), requiresPath() and requiresMethod(). The contract for autodiscoverable adapters
Added GraphQLBodyInterface — extends ActionBodyInterface with getQuery() and getVariables(). Queries can be declared inline or loaded from .graphql files via file_get_contents()

Infrastructure

Added GraphQLClientAdapter — built-in GraphQL adapter. Always POST to the endpoint URL, serialises body as { query, variables }, extracts data[] before the mapper, detects GraphQL errors in HTTP 200 responses and throws RequestResponseException
Added ClientAdapterResolver — registry of adapter classes keyed by getClientType(). Built after compile time from tagged services. Later registrations override earlier ones — project adapters always win over bundle built-ins
SymfonyHttpClientAdapter now implements ClientAdapterInterface with requiresPath(): true and requiresMethod(): true

Bundle

Configuration — new client key per integration: "rest" (default), "graphql", or any registered custom type. client_service still overrides everything
IntegrationCompilerPass — builds ClientAdapterResolver from integration_engine.client_adapter tagged services. Two guards before registration: class_exists() and is_a(ClientAdapterInterface). Fills the resolver service via addMethodCall so the command can use it at runtime
MakeIntegrationCommand — action argument now optional. Client type chosen from registered adapters dynamically. Path and method questions driven by requiresPath() and requiresMethod() — no hardcoded type comparisons. client: soap appears in the list as soon as the adapter is registered
IntegrationContext — replaced isGraphQL() with adapterRequiresPath and adapterRequiresMethod capabilities. Protocol-agnostic
TemplateRenderer — YAML entry and action scaffold driven by adapter capabilities, not by type string

Tests

Added GraphQLClientAdapterTest — 15 tests covering body serialisation, endpoint URL, data extraction, GraphQL errors in 200, HTTP errors, invalid body, headers, auth, and ClientAdapterInterface capabilities
Added ClientAdapterResolverTest — 7 tests covering registration, resolution, project-over-bundle override, full map, empty resolver, and custom adapter

Documentation

DOCUMENTATION.md / DOCUMENTATION_ES.md — Quick start GraphQL example, scaffolding table REST vs GraphQL, client: key in YAML config, GraphQLBodyInterface with file_get_contents pattern, extensibility section with full ClientAdapterInterface example including requiresPath and requiresMethod, two new error entries
TESTING.md — GraphQLClientAdapterTest and ClientAdapterResolverTest suites documented
integration-engine-agent-guide.md — ClientAdapterInterface (3.7) and GraphQLBodyInterface (3.8) sections added, client: vs client_service: FAQ entry