Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Api Platform Events Bundle Laravel Package

alanpoulain/api-platform-events-bundle

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Event-driven architecture: Enables real-time processing of API Platform (GraphQL) operations (e.g., logging, analytics, or triggering workflows) without modifying core logic.
  • Decoupled logic: Allows adding cross-cutting concerns (e.g., audit trails, notifications) via event listeners, adhering to the Single Responsibility Principle.
  • Roadmap for REST support: Justifies monitoring the Stages RFC to future-proof GraphQL/REST consistency.
  • Build vs. Buy: Avoids reinventing event dispatching for API Platform, reducing dev time for custom event systems.
  • Use cases:
    • Audit logging: Track mutations/queries (e.g., PostWriteEvent for data changes).
    • Real-time notifications: Trigger webhooks or messages (e.g., PostReadEvent for data access).
    • Validation hooks: Extend validation logic (e.g., PreValidateEvent for custom rules).
    • Performance monitoring: Log event timings (e.g., PreSerializeEvent for response delays).

When to Consider This Package

  • Use this if:
    • Your API Platform project uses GraphQL (REST support is pending).
    • You need fine-grained control over API operations without modifying core resolvers.
    • Your team prefers Symfony’s event system for extensibility.
    • You’re building features requiring asynchronous side effects (e.g., analytics, notifications).
  • Look elsewhere if:
    • You’re using REST-only (wait for Stages RFC or use API Platform’s native decorators).
    • Your use case fits native API Platform decorators (simpler for basic workflows).
    • You need high-performance event handling (this adds minimal overhead but isn’t optimized for bulk operations).
    • Your stack isn’t Symfony-compatible (e.g., Laravel without Symfony components).

How to Pitch It (Stakeholders)

For Executives: "This package lets us tap into API Platform’s GraphQL operations (queries/mutations) via events—like triggers for our API. For example, we could automatically log every data change or send real-time alerts when critical actions occur, all without touching the core code. It’s a low-risk way to add observability, compliance, or workflow automation. The MIT license and active maintenance make it a safe bet."

For Engineers: "This bundle exposes Symfony events for API Platform’s GraphQL lifecycle (e.g., PostWriteEvent for mutations, PreReadEvent for queries). Instead of decorating resolvers, we can attach listeners to modify behavior—ideal for cross-cutting concerns like auditing, notifications, or validation. It’s lightweight, leverages Symfony’s event system, and avoids vendor lock-in. Tradeoff: GraphQL-only for now (REST support is in progress via the Stages RFC)."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui