garlic/graphql-wrapper
A Laravel-friendly GraphQL wrapper for sending queries and mutations from PHP. Configure endpoints and headers, build requests fluently, and handle responses with clean, testable code—lightweight integration without heavy client dependencies.
Architecture fit. Release 1.1 adds the ability to attach headers to enqueued messages. This is an additive capability on the message envelope and is a conventional, well-understood pattern for broker-backed messaging (AMQP headers, SQS message attributes, STOMP headers). It slots naturally into a Laravel package that owns the publish/enqueue path, and it is the right place to expose it — header metadata belongs on the message, not inside the application payload, since it lets routing, tracing, tenancy and schema-versioning concerns stay out of domain serialization. For a TPM, this is a credible signal that the maintainer is building toward production messaging concerns (observability, multi-tenant routing) rather than just a thin wrapper.
Integration feasibility. Low effort. The change should surface as either an added argument/array on the existing enqueue call, a fluent builder method, or a config-level default. Consumers of the package need to confirm which, but the integration is a single call-site change per producer with no schema migration on the application side. Existing publish calls should be unaffected if the parameter is optional — that must be verified, not assumed.
Technical risk. Low, but not zero. The real risks are at the edges rather than in the code path:
x-death, x-delay) and tracing headers need a namespacing convention, or producers will step on infrastructure.Key questions. Which transports are supported and are headers mapped per-transport (AMQP headers vs SQS message attributes are not the same thing)? Is the API per-message, fluent, or global default? Are headers propagated through Laravel queue jobs, or only through a raw enqueue API? Are values validated/serialized, and what happens on overflow? Do headers survive DLQ and retry flows? Is there a documented reserved-header list? What are the supported PHP/Laravel version bounds?
Stack fit. Presumed Laravel 8+/PHP 8.x with Composer, using the package as the producer side of a broker-backed queue. The feature does not alter the runtime topology — same broker, same consumers, same deployment model — which is what makes it cheap to adopt.
Migration path. No data or schema migration. Pin to ^1.1 in composer.json, run the existing test suite on a branch, and confirm that the enqueue signature change is optional. If any existing call sites pass positional arguments after the payload, check for signature breakage before merging.
Compatibility. Verify three matrices before rollout: PHP/Laravel versions supported by the release, broker versions in use (RabbitMQ 3.x vs 4.x header semantics differ, and SQS has no true headers — only message attributes), and consumer-side client libraries. The last one matters most: a Go or Python consumer must be able to read the header key names and value types the PHP side emits. Also confirm behaviour with a non-PHP or legacy consumer that ignores unknown headers — it should, but that is the assumption that determines whether this is safe to ship.
Sequencing.
Maintenance. Minimal incremental burden. The feature is small and self-contained; the ongoing cost is the header convention itself, which the team owns regardless of package. Watch package release cadence and maintainer responsiveness — a single-maintainer package on the critical messaging path is a supply-chain consideration worth noting at review time, independent of this release.
Support. New support surface is narrow but real: "my consumer isn't seeing the header" is the likely ticket, and it is usually a convention or serialization mismatch rather than a package bug. Documenting the header contract in the platform runbook converts most of these into self-service.
Scaling. Negligible throughput impact — a few dozen bytes per message against typical payload sizes. The only scaling concern is header volume on high-fanout topics where brokers enforce per-message size ceilings; keep headers to identifiers and trace context, not payload fragments.
Failure modes to plan for. Header value rejected or silently coerced by the broker; header exceeding frame/size limits on large batches; reserved-key collision with broker infrastructure; consumer on an older contract dropping unknown headers; headers lost on retry or DLQ replay; and non-UTF8 or binary values corrupting the header table. None are catastrophic, all are diagnosable, and each maps to a one-line check in the producer's test suite.
Ramp-up. Half a day for a Laravel developer to integrate and test; one to two days of team-level effort to agree and document the header convention. The engineering cost is trivial — the coordination cost across producer and consumer teams is the actual project.
How can I help you explore Laravel packages today?