thecodingmachine/graphqlite
GraphQLite is a framework-agnostic PHP library that lets you build a complete GraphQL API by annotating your classes. Define types, queries, mutations, and subscriptions with simple attributes and controller methods, with Symfony and Laravel integrations available.
webonyx/graphql-php.#[Type] and an #[Input] (fully matured in v6 with recursive input types, setters, and #[Input(default: …)] variants), you can decide per-domain whether it participates in the API without maintaining parallel input/output DTOs. This directly reduces the cost of incremental API surface expansion — useful when roadmap items are "expose orders to partners" rather than "rebuild the API".#[Security] / fine-grained field-level security and Laravel-validator-backed input validation mean access-control policy can live at the schema boundary instead of being duplicated in every controller. That is a policy decision worth making explicitly (schema as policy layer vs. service layer), and this package supports the former.ecodev/graphql-upload is "recommended," not bundled) — a scoping decision you must make up front rather than discover mid-sprint.Consider it when:
graphqlite-laravel integration is the intended path; do not hand-wire the core package to Laravel.#[Input] naming/default semantics in 6.0.0; the GraphQL upload dependency becoming optional/recommended in 4.1.0). Budget for upgrade work, not just composer update.Look elsewhere when:
thecodingmachine) is a continuity risk to price in.For executives (one paragraph): We can expose our existing Laravel domain as a GraphQL API without a rewrite. GraphQLite generates the schema from PHP attributes we attach to classes we already own, which means the cost of the API is our resolvers, not a new abstraction layer — and it converts "GraphQL" from a multi-quarter platform initiative into a per-domain, schedulable line item we can ship and expand feature by feature. It is MIT-licensed with no per-seat cost and no vendor lock-in, so the downside is bounded to engineering time we would spend anyway. The trade-off we are accepting is a smaller open-source community and a maintainer concentration risk, which we mitigate with pinned versions, a locked upgrade cadence, and — because everything is plain PHP on top of webonyx/graphql-php — a realistic exit path if the project stalls.
For engineering (the working summary):
#[Type], #[Field], #[Input], #[Mutation], #[Query], #[Security] on your existing classes and controller methods produce a complete, spec-compliant GraphQL schema executed by webonyx/graphql-php. Use the graphqlite-laravel package, not the core package directly.#[Input] fields, and multiple named input variants off a single class). We avoid the classic duplication of Eloquent model + GraphQL DTO + request validator.#[Security], autowiring in resolvers, and #[deprecated] propagating to the schema. Introspection toggling, max query complexity, and max query depth are configurable — we should enable them from day one, not after an incident.ecodev/graphql-upload as a separate dependency and reviewing it.How can I help you explore Laravel packages today?