jerowork / graphql-attribute-schema
Build your GraphQL schema for webonyx/graphql-php using PHP attributes instead of array-based configuration.
Installs: 3 627
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 2
Forks: 0
Open Issues: 5
Requires
- php: ^8.3
- ext-tokenizer: *
- psr/container: ^2.0
- webonyx/graphql-php: ^15.19
Requires (Dev)
- captainhook/captainhook: ^5.24
- friendsofphp/php-cs-fixer: ^3.66
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5 || ^12.0
- rector/rector: ^2.0
- rregeer/phpunit-coverage-check: ^0.3
- scrutinizer/ocular: ^1.9
- shipmonk/composer-dependency-analyser: ^1.8
- dev-main
- 0.6.4
- 0.6.3
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.1
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.0
- dev-dependabot/composer/webonyx/graphql-php-15.21.3
- dev-dependabot/composer/phpstan/phpstan-2.1.19
- dev-dependabot/composer/rector/rector-2.1.2
- dev-dependabot/composer/friendsofphp/php-cs-fixer-3.84.0
- dev-dependabot/composer/phpunit/phpunit-12.2.7
- dev-dependabot/composer/webonyx/graphql-php-15.21.2
This package is auto-updated.
Last update: 2025-07-24 22:37:10 UTC
README
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.