PHPackages                             mathsgod/light-db-graphqlite-mappers - 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. [Database &amp; ORM](/categories/database)
4. /
5. mathsgod/light-db-graphqlite-mappers

ActiveLibrary[Database &amp; ORM](/categories/database)

mathsgod/light-db-graphqlite-mappers
====================================

Light DB GraphQLite Mappers

v1.0.1(1mo ago)0148↑31.3%1MITPHP

Since May 15Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/mathsgod/light-db-graphqlite-mappers)[ Packagist](https://packagist.org/packages/mathsgod/light-db-graphqlite-mappers)[ RSS](/packages/mathsgod-light-db-graphqlite-mappers/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (4)Versions (3)Used By (1)

light-db-graphqlite-mappers
===========================

[](#light-db-graphqlite-mappers)

A [GraphQLite](https://graphqlite.thecodingmachine.io/) type mapper that exposes `Light\Db\Query` objects as paginated GraphQL types with metadata.

Installation
------------

[](#installation)

```
composer require mathsgod/light-db-graphqlite-mappers
```

What it does
------------

[](#what-it-does)

When a GraphQL field returns a `Light\Db\Query` instance, this mapper automatically wraps it into a structured type with two fields:

FieldTypeDescription`data``[T!]!`The list of records, supports `limit` / `offset``meta``DB_META!`Metadata about the query result### `DB_META` fields

[](#db_meta-fields)

FieldTypeDescription`total``Int`Total number of matching records`class``String`Fully qualified class name`key``String`Primary key field name`name``String`Short class nameUsage
-----

[](#usage)

Register the type mapper with your GraphQLite `SchemaFactory`:

```
use Light\Db\GraphQLite\Mappers\TypeMapper;

$schemaFactory->addTypeMapper(new TypeMapper($factoryContext));
```

Then return a `Light\Db\Query` from any GraphQL query method and type-hint the sub-type:

```
use TheCodingMachine\GraphQLite\Annotations\Query;
use Light\Db\Query;

#[Query]
public function users(): Query /*  */
{
    return User::query();
}
```

The generated GraphQL type will be `DB_QUERY_User` with `data` and `meta` fields.

### Example GraphQL query

[](#example-graphql-query)

```
{
    users {
        data(limit: 10, offset: 0) {
            id
            name
        }
        meta {
            total
            key
        }
    }
}
```

Requirements
------------

[](#requirements)

- PHP 8.1+
- `thecodingmachine/graphqlite` ^8.0
- `mathsgod/light-db`

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance94

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~381 days

Total

2

Last Release

33d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18732337?v=4)[Raymond](/maintainers/mathsgod)[@mathsgod](https://github.com/mathsgod)

---

Top Contributors

[![mathsgod](https://avatars.githubusercontent.com/u/18732337?v=4)](https://github.com/mathsgod "mathsgod (4 commits)")

### Embed Badge

![Health badge](/badges/mathsgod-light-db-graphqlite-mappers/health.svg)

```
[![Health](https://phpackages.com/badges/mathsgod-light-db-graphqlite-mappers/health.svg)](https://phpackages.com/packages/mathsgod-light-db-graphqlite-mappers)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M118](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[oxid-esales/graphql-base

OXID eSales GraphQL base module

24107.6k16](/packages/oxid-esales-graphql-base)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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