Download the PHP package mathsgod/light-db-graphqlite-mappers without Composer
On this page you can find all versions of the php package mathsgod/light-db-graphqlite-mappers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download mathsgod/light-db-graphqlite-mappers
More information about mathsgod/light-db-graphqlite-mappers
Files in mathsgod/light-db-graphqlite-mappers
Download mathsgod/light-db-graphqlite-mappers
More information about mathsgod/light-db-graphqlite-mappers
Files in mathsgod/light-db-graphqlite-mappers
Vendor mathsgod
Package light-db-graphqlite-mappers
Short Description Light DB GraphQLite Mappers
License MIT
Package light-db-graphqlite-mappers
Short Description Light DB GraphQLite Mappers
License MIT
Please rate this library. Is it a good library?
Informations about the package light-db-graphqlite-mappers
light-db-graphqlite-mappers
A GraphQLite type mapper that exposes Light\Db\Query objects as paginated GraphQL types with metadata.
Installation
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:
| Field | Type | Description |
|---|---|---|
data |
[T!]! |
The list of records, supports limit / offset |
meta |
DB_META! |
Metadata about the query result |
DB_META fields
| Field | Type | Description |
|---|---|---|
total |
Int |
Total number of matching records |
class |
String |
Fully qualified class name |
key |
String |
Primary key field name |
name |
String |
Short class name |
Usage
Register the type mapper with your GraphQLite SchemaFactory:
Then return a Light\Db\Query from any GraphQL query method and type-hint the sub-type:
The generated GraphQL type will be DB_QUERY_User with data and meta fields.
Example GraphQL query
Requirements
- PHP 8.1+
thecodingmachine/graphqlite^8.0mathsgod/light-db
License
MIT
All versions of light-db-graphqlite-mappers with dependencies
PHP Build Version
Package Version
Requires
thecodingmachine/graphqlite Version
^8.0
The package mathsgod/light-db-graphqlite-mappers contains the following files
Loading the files please wait ...