jerowork / graphql-attribute-schema
Build your GraphQL schema for webonyx/graphql-php using PHP attributes instead of array-based configuration.
Installs: 10 995
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/jerowork/graphql-attribute-schema
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.7
- 0.6.6
- 0.6.5
- 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.25.1
- dev-nullable-return-deferred-type-loader-2
- dev-dependabot/composer/phpstan/phpstan-2.1.31
- dev-dependabot/composer/phpunit/phpunit-12.4.1
- dev-dependabot/composer/rector/rector-2.2.2
This package is auto-updated.
Last update: 2025-10-11 09:19:17 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.