Weave 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

Graphql Controllers Laravel Package

thecodingmachine/graphql-controllers

A PHP package for defining GraphQL APIs with controller classes: annotate methods to resolve queries, mutations, and fields, then wire them into a webonyx/graphql-php schema with dependency injection.

Deep Wiki
Context7

Product Decisions This Supports

  • API architecture choice (controller-first GraphQL): This package lets engineers define GraphQL operations as controller classes rather than resolver functions or schema-first definitions. That directly supports the decision of how to expose a GraphQL endpoint — a structural/architectural call that affects onboarding, code organization, and long-term maintainability of the API layer.
  • Build vs. buy for the GraphQL abstraction layer: Instead of hand-rolling a routing/dispatch layer on top of webonyx/graphql-php, the team can adopt this package to get a controller-based dispatch pattern out of the box. The PM decision is whether that abstraction is worth a dependency versus a small internal convention.
  • Roadmap sequencing for GraphQL adoption: If the roadmap includes migrating from REST to GraphQL incrementally, a controller-per-operation pattern maps cleanly onto existing Laravel controllers, lowering the ramp-up cost and de-risking the migration timeline.
  • Team scalability and onboarding: Because it mirrors the familiar MVC "route → controller" mental model, it reduces the GraphQL-specific knowledge bar for backend engineers — a lever for staffing decisions on who can contribute to the API.
  • Use-case fit for CRUD-heavy domains: Best suited to internal tools, admin panels, and mid-complexity product APIs where operations map naturally to discrete controllers, not to highly federated or schema-driven multi-team graphs.

When to Consider This Package

  • Adopt when: the stack is Laravel/PHP and already uses (or plans to use) webonyx/graphql-php; the team is small-to-mid and MVC-fluent; the GraphQL surface is a bounded, product-owned API (not a public multi-consumer platform); and speed-to-first-endpoint matters more than ecosystem maturity.
  • Adopt when: you want a lightweight convention over configuration and are comfortable owning a thin abstraction layer yourselves if the package changes.
  • Look elsewhere when: you need a large, actively maintained ecosystem (e.g., Lighthouse, which is Laravel-native and far more widely adopted), schema-first development with directive-driven authorization, or federation/subgraph support.
  • Look elsewhere when: the API is high-traffic and mission-critical and you require a vendor/SLA-backed dependency — with ~11 GitHub stars, a single-maintainer/consultancy footprint, and a last release in early 2023, bus-factor and maintenance risk are material.
  • Look elsewhere when: you need long-term LTS alignment, security-patch responsiveness, or community support channels; treat this as a "low-adoption, evaluate-in-spike" candidate rather than a default.

How to Pitch It (Stakeholders)

  • For executives: A lightweight open-source library that lets our PHP engineers build GraphQL endpoints using the same controller pattern they already know, shortening time-to-delivery for GraphQL features and reducing specialized GraphQL hiring needs. Caveat: it has low community adoption and hasn't shipped a release since early 2023, so we should treat adoption as a time-boxed spike with a documented exit path, not a multi-year platform bet.
  • For engineering: It wraps webonyx/graphql-php and turns each GraphQL operation into a testable, injectable controller class — less resolver boilerplate, clearer code ownership, and familiar MVC ergonomics for anyone who's written Laravel controllers. We validate it behind an interface so we can swap to Lighthouse or a custom dispatcher if maintenance stalls.
  • Bottom line recommendation: Worth a 1–2 sprint proof-of-concept on a bounded, non-critical API surface to measure developer velocity gains; gate full adoption on that spike plus a maintenance-risk review, and keep the abstraction thin enough to replace.
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource