PHPackages                             thecodingmachine/graphqlite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. thecodingmachine/graphqlite

ActiveLibrary[API Development](/categories/api)

thecodingmachine/graphqlite
===========================

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

v8.3.0(1mo ago)5723.2M↓53.8%107[24 issues](https://github.com/thecodingmachine/graphqlite/issues)[3 PRs](https://github.com/thecodingmachine/graphqlite/pulls)20MITMDXPHP &gt;=8.2CI passing

Since Apr 23Pushed 3w ago17 watchersCompare

[ Source](https://github.com/thecodingmachine/graphqlite)[ Packagist](https://packagist.org/packages/thecodingmachine/graphqlite)[ RSS](/packages/thecodingmachine-graphqlite/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (68)Versions (47)Used By (20)

 [![GraphQLite logo](https://camo.githubusercontent.com/1c912e15f231030f4dd21f32206fadcce8e097fdee30a92f4e0ec42166939a0a/68747470733a2f2f6772617068716c6974652e746865636f64696e676d616368696e652e696f2f696d672f6c6f676f2e737667)](https://camo.githubusercontent.com/1c912e15f231030f4dd21f32206fadcce8e097fdee30a92f4e0ec42166939a0a/68747470733a2f2f6772617068716c6974652e746865636f64696e676d616368696e652e696f2f696d672f6c6f676f2e737667)

### GraphQLite

[](#graphqlite)

GraphQL in PHP made easy.

[Documentation](https://graphqlite.thecodingmachine.io) · [Contributing](/.github/CONTRIBUTING.md)

 [ ![Latest Stable Version](https://camo.githubusercontent.com/e1add0081e69da90e3353eccba46c598ddefa8f6a82b830a98ae7287da9be2d6/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f6772617068716c6974652f762f737461626c65) ](https://packagist.org/packages/thecodingmachine/graphqlite "Latest Stable Version") [ ![Total Downloads](https://camo.githubusercontent.com/2e8a3d197d791e3fbeb2b4d30b3f7ee81437790f765e76ddcdcf71f89e7000c8/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f6772617068716c6974652f646f776e6c6f616473) ](https://packagist.org/packages/thecodingmachine/graphqlite "Total Downloads") [ ![License](https://camo.githubusercontent.com/f4c003e7b7a79e8dffdab731389f0bd29f2464628c6528c1c20f7a1acd141837/68747470733a2f2f706f7365722e707567782e6f72672f746865636f64696e676d616368696e652f6772617068716c6974652f6c6963656e7365) ](https://packagist.org/packages/thecodingmachine/graphqlite "License") [ ![Continuous Integration](https://github.com/thecodingmachine/graphqlite/workflows/Continuous%20Integration/badge.svg) ](https://github.com/thecodingmachine/graphqlite/actions "Continuous Integration") [ ![Code Coverage](https://camo.githubusercontent.com/9e2b50f8e5a54d4b5d2c5284f63e8f34d51d0c5072e03cc8d48c72d5018e2f39/68747470733a2f2f636f6465636f762e696f2f67682f746865636f64696e676d616368696e652f6772617068716c6974652f6272616e63682f6d61737465722f67726170682f62616467652e737667) ](https://codecov.io/gh/thecodingmachine/graphqlite "Code Coverage")

---

A GraphQL library for PHP that allows you to use attributes (or annotations) to define your schema and write your queries and mutations using simple-to-write controllers.

Features
--------

[](#features)

- Create a complete GraphQL API by simply annotating your PHP classes
- Framework agnostic, but with [Symfony](https://github.com/thecodingmachine/graphqlite-bundle) and [Laravel](https://github.com/thecodingmachine/graphqlite-laravel) integrations available!
- Comes with batteries included 🔋: queries, mutations, subscriptions, mapping of arrays/iterators, file uploads, extendable types and more!

Basic example
-------------

[](#basic-example)

First, declare a mutation in your controller:

```
class ProductController
{
    #[Mutation]
    public function updateProduct(Product $product): Product
    {
        // Some code that gets and updates a Product
        return $product;
    }
}
```

Then, annotate the `Product` class to declare what fields are exposed to the GraphQL API:

```
#[Type]
#[Input(update: true)]
class Product
{
    #[Field]
    public function getName(): string
    {
        return $this->name;
    }

    #[Field]
    public function setName(string $name): void
    {
        $this->name = $name;
    }

    // ...
}
```

That's it, you're good to go 🎉 mutate away!

```
{
  updateProduct(product: {
    name: 'John Doe'
  }) {
    name
  }
}
```

Want to learn more? Head to the [documentation](https://graphqlite.thecodingmachine.io/)!

Contributing
------------

[](#contributing)

Contributions are welcomed via pull requests. If you'd like to discuss prior to submitting a PR, consider a [discussion](https://github.com/thecodingmachine/graphqlite/discussions). If it's a bug/issue, you can [submit an issue](https://github.com/thecodingmachine/graphqlite/issues) first.

All PRs should have sufficient test coverage for any additions or changes. PRs will not be merged without these.

###  Health Score

75

—

ExcellentBetter than 100% of packages

Maintenance93

Actively maintained with recent releases

Popularity65

Solid adoption and visibility

Community46

Growing community involvement

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 70.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~71 days

Recently: every ~60 days

Total

37

Last Release

43d ago

Major Versions

v4.3.0 → v5.0.02021-10-25

v5.0.2 → v6.0.02022-06-11

v5.0.3 → v6.1.02022-10-28

v6.2.3 → v7.0.02024-03-20

v7.0.0 → v8.0.02024-12-18

PHP version history (6 changes)v3.0.0PHP &gt;=7.1

v4.0.0PHP &gt;=7.2

v6.0.0PHP &gt;=7.4

v6.1.0PHP &gt;=8.0

v6.2.0PHP &gt;=8.1

v8.2.0PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1104771?v=4)[mouf](/maintainers/mouf)[@Mouf](https://github.com/Mouf)

![](https://avatars.githubusercontent.com/u/1847918?v=4)[TheCodingMachine](/maintainers/thecodingmachine)[@thecodingmachine](https://github.com/thecodingmachine)

---

Top Contributors

[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (860 commits)")[![oojacoboo](https://avatars.githubusercontent.com/u/764664?v=4)](https://github.com/oojacoboo "oojacoboo (84 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (82 commits)")[![devmaslov](https://avatars.githubusercontent.com/u/17141793?v=4)](https://github.com/devmaslov "devmaslov (42 commits)")[![TamasSzigeti](https://avatars.githubusercontent.com/u/148897?v=4)](https://github.com/TamasSzigeti "TamasSzigeti (29 commits)")[![realFlowControl](https://avatars.githubusercontent.com/u/14161194?v=4)](https://github.com/realFlowControl "realFlowControl (17 commits)")[![oprypkhantc](https://avatars.githubusercontent.com/u/54406427?v=4)](https://github.com/oprypkhantc "oprypkhantc (17 commits)")[![l-you](https://avatars.githubusercontent.com/u/32598874?v=4)](https://github.com/l-you "l-you (9 commits)")[![andrew-demb](https://avatars.githubusercontent.com/u/12499813?v=4)](https://github.com/andrew-demb "andrew-demb (9 commits)")[![mistraloz](https://avatars.githubusercontent.com/u/2956113?v=4)](https://github.com/mistraloz "mistraloz (8 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (7 commits)")[![fezfez](https://avatars.githubusercontent.com/u/1162307?v=4)](https://github.com/fezfez "fezfez (6 commits)")[![xyng](https://avatars.githubusercontent.com/u/2403703?v=4)](https://github.com/xyng "xyng (5 commits)")[![spartaksun](https://avatars.githubusercontent.com/u/6684190?v=4)](https://github.com/spartaksun "spartaksun (5 commits)")[![mdoelker](https://avatars.githubusercontent.com/u/2145319?v=4)](https://github.com/mdoelker "mdoelker (4 commits)")[![cvergne](https://avatars.githubusercontent.com/u/1032689?v=4)](https://github.com/cvergne "cvergne (4 commits)")[![fogrye](https://avatars.githubusercontent.com/u/141632421?v=4)](https://github.com/fogrye "fogrye (4 commits)")[![Kharhamel](https://avatars.githubusercontent.com/u/10496706?v=4)](https://github.com/Kharhamel "Kharhamel (4 commits)")[![Zheness](https://avatars.githubusercontent.com/u/5830103?v=4)](https://github.com/Zheness "Zheness (3 commits)")[![shish](https://avatars.githubusercontent.com/u/40659?v=4)](https://github.com/shish "shish (3 commits)")

---

Tags

attributesgraphqllaravelphpsymfony

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/thecodingmachine-graphqlite/health.svg)

```
[![Health](https://phpackages.com/badges/thecodingmachine-graphqlite/health.svg)](https://phpackages.com/packages/thecodingmachine-graphqlite)
```

###  Alternatives

[cakephp/cakephp

The CakePHP framework

8.8k19.1M1.7k](/packages/cakephp-cakephp)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k11](/packages/tempest-framework)[typo3/cms-core

TYPO3 CMS Core

3312.9M4.7k](/packages/typo3-cms-core)[windwalker/framework

The next generation PHP framework.

25640.0k1](/packages/windwalker-framework)[moonshine/moonshine

Laravel administration panel

1.3k239.9k72](/packages/moonshine-moonshine)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
