https://github.com/jerowork/graphql-attribute-schema
Easily build your GraphQL schema for webonyx/graphql-php using PHP attributes instead of large configuration arrays.
https://github.com/jerowork/graphql-attribute-schema
attributes graphql webonyx
Last synced: 2 months ago
JSON representation
Easily build your GraphQL schema for webonyx/graphql-php using PHP attributes instead of large configuration arrays.
- Host: GitHub
- URL: https://github.com/jerowork/graphql-attribute-schema
- Owner: jerowork
- License: mit
- Created: 2025-01-02T14:21:36.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-02-19T18:21:00.000Z (4 months ago)
- Last Synced: 2025-03-28T20:16:53.461Z (3 months ago)
- Topics: attributes, graphql, webonyx
- Language: PHP
- Homepage: https://jerowork.github.io/graphql-attribute-schema/
- Size: 556 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- trackawesomelist - jerowork/graphql-schema-builder (⭐1) - Easily build your GraphQL schema for webonyx/graphql-php using PHP attributes instead of large configuration arrays. (Recently Updated / [Feb 11, 2025](/content/2025/02/11/README.md))
README
# GraphQL Attribute Schema
[](https://github.com/jerowork/graphql-attribute-schema/actions)
[](https://scrutinizer-ci.com/g/jerowork/graphql-attribute-schema/code-structure)
[](https://scrutinizer-ci.com/g/jerowork/graphql-attribute-schema)
[](LICENSE)
[](https://packagist.org/packages/jerowork/graphql-attribute-schema)Easily build your GraphQL schema for [webonyx/graphql-php](https://github.com/webonyx/graphql-php) using **PHP attributes** instead of large configuration arrays.
## 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 using large and complex PHP arrays, making it harder to manage and maintain.
Wouldn’t it be great if there was a **simpler, more structured way** to define your schema?
That’s exactly what **GraphQL Attribute Schema** does! 🚀
By adding attributes (`#[Mutation]`, `#[Query]`, `#[Type]`, etc.) directly to your classes, this library **automatically generates** the GraphQL schema for you; **cleaner, faster, and easier to maintain**.
## 📖 Documentation
Documentation is available at [jerowork.github.io/graphql-attribute-schema](https://jerowork.github.io/graphql-attribute-schema) or in the [docs](docs/index.md).