PHPackages                             jerowork/graphql-attribute-schema - 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. jerowork/graphql-attribute-schema

ActiveLibrary[API Development](/categories/api)

jerowork/graphql-attribute-schema
=================================

Build your GraphQL schema for webonyx/graphql-php using PHP attributes instead of array-based configuration.

0.7.0(4mo ago)1727.1k↓43.7%MITPHPPHP ^8.3CI passing

Since Jan 30Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/jerowork/graphql-attribute-schema)[ Packagist](https://packagist.org/packages/jerowork/graphql-attribute-schema)[ RSS](/packages/jerowork-graphql-attribute-schema/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (18)Used By (0)

GraphQL Attribute Schema
========================

[](#graphql-attribute-schema)

[![Build Status](https://camo.githubusercontent.com/7db66b8700ec9bce3e8a8c9fe6963dd998466c31ad76b6be005453dee07dcf73/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a65726f776f726b2f6772617068716c2d6174747269627574652d736368656d612f6261646765732f6275696c642e706e673f623d6d61696e)](https://github.com/jerowork/graphql-attribute-schema/actions)[![Coverage Status](https://camo.githubusercontent.com/41ae6e6307ae2a36c40966590326fd9f860ff2db638f684b68453a669e73f96a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6a65726f776f726b2f6772617068716c2d6174747269627574652d736368656d612e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/jerowork/graphql-attribute-schema/code-structure)[![Quality Score](https://camo.githubusercontent.com/9885e3bf3de9df4cad974f39947a74de1f4af7d76fd0137896e323eda17cdf15/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6a65726f776f726b2f6772617068716c2d6174747269627574652d736368656d612e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/jerowork/graphql-attribute-schema)[![Software License](https://camo.githubusercontent.com/f251623e510f5909f16ae3f4e6e548dac11340b9fde1a99be26b015b39272c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c6174)](LICENSE)[![Downloads](https://camo.githubusercontent.com/fe1421812f65e0fed428d6ebc131d1ba63cf8f48fec21a66227d4da30dabfa66/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a65726f776f726b2f6772617068716c2d6174747269627574652d736368656d613f7374796c653d666c617426636f6c6f723d346263363164)](https://packagist.org/packages/jerowork/graphql-attribute-schema)[![PHP Version](https://camo.githubusercontent.com/05de8fa997dec7bd6b39b7af8c030c734835c6871547f8b2d9ae87e4299ebc8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e332d3838393242462e7376673f7374796c653d666c6174)](https://packagist.org/packages/jerowork/graphql-attribute-schema)

Build your GraphQL schema for [webonyx/graphql-php](https://github.com/webonyx/graphql-php) using **PHP attributes** instead of array-based configuration.

Why use this library?
---------------------

[](#why-use-this-library)

The [webonyx/graphql-php](https://github.com/webonyx/graphql-php) package requires a **schema** to run a GraphQL server. Normally, this schema is defined based on array configuration.

This package introduces PHP attributes to configure your GraphQL schema instead. By adding attributes (`#[Mutation]`, `#[Query]`, `#[Type]`, etc.) directly to your classes, this library **automatically generates** the GraphQL schema for you.

📖 Documentation
---------------

[](#-documentation)

The documentation is available on [GitHub pages](https://jerowork.github.io/graphql-attribute-schema/docs) or in the [GitHub repository](https://github.com/jerowork/graphql-attribute-schema/blob/main/docs/index.md).

There is also an example application using most of the features at .

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance77

Regular maintenance activity

Popularity35

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.8% 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 ~21 days

Recently: every ~37 days

Total

17

Last Release

123d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f5fda898ea5700962c462ce21749b844fa13a9b239bfb52c95926a90d07c0ef5?d=identicon)[jerowork](/maintainers/jerowork)

---

Top Contributors

[![jerowork](https://avatars.githubusercontent.com/u/4119451?v=4)](https://github.com/jerowork "jerowork (183 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (81 commits)")[![spawnia](https://avatars.githubusercontent.com/u/12158000?v=4)](https://github.com/spawnia "spawnia (2 commits)")

---

Tags

attributesgraphqlwebonyxgraphqlattributeswebonyx

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jerowork-graphql-attribute-schema/health.svg)

```
[![Health](https://phpackages.com/badges/jerowork-graphql-attribute-schema/health.svg)](https://phpackages.com/packages/jerowork-graphql-attribute-schema)
```

###  Alternatives

[nuwave/lighthouse

A framework for serving GraphQL from Laravel

3.5k10.7M93](/packages/nuwave-lighthouse)[thecodingmachine/graphqlite

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

5723.1M30](/packages/thecodingmachine-graphqlite)[overblog/graphql-bundle

This bundle provides tools to build a GraphQL server in your Symfony App.

8027.9M28](/packages/overblog-graphql-bundle)[aimeos/ai-admin-graphql

Aimeos Admin GraphQL API extension

944100.0k4](/packages/aimeos-ai-admin-graphql)[mll-lab/graphql-php-scalars

A collection of custom scalar types for usage with https://github.com/webonyx/graphql-php

1394.2M28](/packages/mll-lab-graphql-php-scalars)[ivome/graphql-relay-php

A PHP port of GraphQL Relay reference implementation

271632.4k5](/packages/ivome-graphql-relay-php)

PHPackages © 2026

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