aimeos/ai-admin-graphql
Laravel package adding a GraphQL API for Aimeos admin: manage products, categories, customers, orders, and more via flexible queries and mutations. Built for headless backends and integrations, with auth support and Aimeos data model coverage.
Begin by installing the package: composer require aimeos/ai-admin-graphql, then publish its config: php artisan vendor:publish --provider="Aimeos\AiAdminGraphQL\ServiceProvider". Ensure Aimeos is properly configured in config/aimeos.php and that the GraphQL admin service provider is registered (usually automatic). Set up authentication—this package requires an auth layer like aimeos/ai-admin-jwt—otherwise requests to /graphql/admin will return 401. The first practical use is fetching product data: send a POST to /graphql/admin with
query { products(limit: 5, page: 1) { id label price(stock: "price") } }
using a valid admin JWT in the Authorization: Bearer ... header. Consult config/admin.php for Aimeos backend connection details—it must match your existing Aimeos installation.
products, categories, reviews) in one query to minimize HTTP round-trips—ideal for dashboard widgets.productCreate, productUpdate, attributeDelete for backend-driven UI updates (e.g., mass-import via Laravel Jobs).ProductSyncService) using Http::graphQL() to push/pull data to/from ERP, PIM, or custom microservices.products(filter: [code:eq:"SKU-123"])) for precise listing views, avoiding post-processing in PHP.aimeos/ai-admin-jwt (or equivalent) is installed, configured, and active; otherwise queries fail with ambiguous 401 or 403 errors.product/attribute, media), or disabled plugins won’t appear in the schema—verify via introspection in GraphiQL (if enabled) or graphql: introspect.Cache::remember("graphql:query_hash", ...)) if client-side caching isn’t sufficient.LOG_CHANNEL=graphiql, debug: true in config/graphiql.php if used), and inspect laravel.log for graphql.error entries with stack traces.aimeos.graphql.type.* and aimeos.graphql.mutation.* events—not by editing schema.graphql directly (which is regenerated). For advanced customization, publish and customize the config (e.g., config/graphiql.php, config/aimeos.php GraphQL section).How can I help you explore Laravel packages today?