jerowork/graphql-attribute-schema

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

Installs: 12 375

Dependents: 0

Suggesters: 0

Security: 0

Stars: 16

Watchers: 2

Forks: 0

Open Issues: 1

pkg:composer/jerowork/graphql-attribute-schema

0.6.7 2025-10-11 09:17 UTC

README

Build Status Coverage Status Quality Score Software License Downloads PHP Version

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

Why use this library?

The 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

The documentation is available on GitHub pages or in the GitHub repository.

There is also an example application using most of the features at https://github.com/jerowork/example-application-graphql-attribute-schema.