bagisto/bagisto-api
REST and GraphQL API layer for Bagisto 2.3.8+, built on API Platform. Quickly install via Composer and an Artisan installer to get API docs, GraphQL Playground, and shop/admin endpoints for e‑commerce integrations and extensions.
This package (Bagisto API Platform v1.0.4) remains a Laravel-compatible API layer for e-commerce, maintaining alignment with headless commerce, multi-channel storefronts, and decoupled architectures. Key updates in v1.0.4 reinforce its strengths:
graphql-persisted-queries) to mitigate performance risks in complex schemas.EventBookingResolver) and input types, reducing custom development for time-sensitive products.Accept-Language) with fallback chains, simplifying multi-region deployments.CursorAwareCollectionProvider now include index-aware cursors for faster offset calculations in large catalogs.Updated Potential Misfits:
EventBookingInput) may require frontend updates if relying on dynamic queries.api-platform/core@3.1.0, easing minor upgrades.| Component | Feasibility | Notes |
|---|---|---|
| GraphQL Persisted Queries | High | Enabled via graphql-persisted-queries; reduces payload size and mitigates DoS risks. |
| Event/Booking Workflows | High | New EventBookingResolver and EventBookingInput streamline time-bound product management. |
| Locale Auto-Detection | High | Eliminates manual locale configuration for Accept-Language headers. |
| Cursor Pagination | High | Index-aware cursors improve performance for large datasets (e.g., 100K+ products). |
| Custom Product Types | Medium-High | Booking/event models now support recurring payments and capacity limits out-of-box. |
| Third-Party Integrations | Medium | Stripe/PayPal connectors remain external; new WebhookProcessor for booking confirmations. |
Key Dependencies (Updated):
graphql-persisted-queries package (auto-installed via Composer).| Risk Area | Severity | Mitigation |
|---|---|---|
| GraphQL Schema Changes | Medium | New EventBooking types may break existing queries; use persisted queries to reduce risk. |
| Persisted Query Overhead | Low | Storage backend (e.g., Redis) required; test with 10K+ unique queries for scalability. |
| Booking System Complexity | Medium | Recurring payments/capacity limits add edge cases; validate with load tests (e.g., 1K concurrent bookings). |
| Locale Fallback Logic | Low | Auto-detection is robust, but test edge cases (e.g., en-US vs. en-GB conflicts). |
| API Platform Upgrade Path | High | v1.0.4 adds checks for 3.1.0, but major upgrades (e.g., to 4.x) still require manual effort. |
Critical Questions for TPM (Updated):
api-platform/core directly).EventBooking types.createEventBooking).Accept-Language headers.EventBookingResolver.| Compatibility Check | Status | Notes |
|---|---|---|
| GraphQL Persisted Queries | ✅ Supported | Requires graphql-persisted-queries package and storage backend (Redis recommended). |
| Event Booking Features | ✅ New | Supports recurring payments and capacity limits; test with Stripe/PayPal webhooks. |
| Locale Auto-Detection | ✅ New | Overrides manual locale config; verify with edge-case headers (e.g., en-US;q=0.8). |
| Cursor Pagination | ✅ Optimized | Index-aware cursors reduce DB load; test with offset-based queries for comparison. |
| Laravel 9.x + API Platform 3.1.0 | ✅ Supported | Minor upgrades only; major versions require manual testing. |
graphql-persisted-queries and configure storage (e.g., Redis).api-platform-vendor.php to enable persisted queries and locale auto-detection.php vendor/bin/graphql-persisted-queries:generate).EventBookingResolver.EventBooking types may require frontend updates if queriesHow can I help you explore Laravel packages today?