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

Ai Admin Graphql Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Getting Started

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.

Implementation Patterns

  • Batched admin operations: Combine related resources (e.g., products, categories, reviews) in one query to minimize HTTP round-trips—ideal for dashboard widgets.
  • CRUD via mutations: Use productCreate, productUpdate, attributeDelete for backend-driven UI updates (e.g., mass-import via Laravel Jobs).
  • Backend automation: Wrap GraphQL calls in Laravel service classes (ProductSyncService) using Http::graphQL() to push/pull data to/from ERP, PIM, or custom microservices.
  • Admin UI development: Leverage the schema’s alignment with Aimeos’ official admin interface—schema introspection reveals field names and relations used in the native UI, easing development for internal tools in Vue/React/Astro.
  • Custom filters: Utilize structured filtering (e.g., products(filter: [code:eq:"SKU-123"])) for precise listing views, avoiding post-processing in PHP.

Gotchas and Tips

  • Auth is non-negotiable: This package provides no auth—ensure aimeos/ai-admin-jwt (or equivalent) is installed, configured, and active; otherwise queries fail with ambiguous 401 or 403 errors.
  • Schema reflects Aimeos config: Custom attributes, extended domains (e.g., product/attribute, media), or disabled plugins won’t appear in the schema—verify via introspection in GraphiQL (if enabled) or graphql: introspect.
  • No built-in caching: GraphQL responses won’t cache automatically—implement custom middleware (e.g., Cache::remember("graphql:query_hash", ...)) if client-side caching isn’t sufficient.
  • Debugging: Enable Laravel logging for GraphQL (LOG_CHANNEL=graphiql, debug: true in config/graphiql.php if used), and inspect laravel.log for graphql.error entries with stack traces.
  • Extensibility: Extend or override schema types via 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).
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport