jerowork/graphql-attribute-schema

Easily build your GraphQL schema for webonyx/graphql-php using PHP attributes instead of large configuration arrays.

0.1.0 2025-01-30 19:35 UTC

This package is auto-updated.

Last update: 2025-01-30 21:50:23 UTC


README

Build Status Coverage Status Quality Score Software License PHP Version

Easily build your GraphQL schema for webonyx/graphql-php using PHP attributes instead of large configuration arrays.

⚠️ Note: This library is still a work in progress. Check out the TODO list for details.

Why use this library?

The 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 in the docs directory.