Easily build your GraphQL schema for webonyx/graphql-php using PHP attributes instead of large configuration arrays.
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 is available at jerowork.github.io/graphql-attribute-schema or in the docs.