zestic / graphql-component
GraphQL component
v0.17.1
2024-11-07 15:46 UTC
Requires
- php: ^8.3
- firebase/php-jwt: ^6.10.1
- laminas/laminas-diactoros: ^2.6
- laminas/laminas-servicemanager: ^4.0
- netglue/laminas-messenger: ^2.0
- psr/container: ^1.0 || ^2.0
- psr/log: ^2.0 || ^3.0
- zestic/app-library: ^v0.13.0
- zestic/contracts: ^0.2
- zestic/webonxy-middleware: ^1.1.0
Requires (Dev)
- phpunit/phpunit: ^10
- dev-main
- v0.17.1
- v0.17.0
- v0.16.1
- v0.16.0
- V0.15.0
- v0.14.5
- v0.14.4
- v0.14.3
- v0.14.2
- v0.14.1
- v0.14.0
- v0.13.0
- v0.12.1
- v0.12.0
- v0.11.5
- v0.11.4
- v0.11.3
- v0.11.2
- v0.11.1
- v0.11.0
- v0.10.0
- v0.9.0
- v0.8.2
- v0.8.1
- v0.8.0
- v0.7.0
- v0.6.1
- v0.6.0
- v0.5.0
- v0.4.1
- v0.4.0
- v0.3.4
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.1
- v0.1.0
- v0.0.1
This package is auto-updated.
Last update: 2024-11-07 17:33:02 UTC
README
Bridge between Webonxy and Symfony Messenger
All messages must extend GraphQLMessage
There is a new auto wire feature It can cause your request to take several seconds. You'll need to make sure you have
ConfigAggregator::ENABLE_CACHE
set to true
.
ConfigAggregator::ENABLE_CACHE => true,
For everything not autowired, it can be added manually. Config
'graphQL' => [ 'mutations' => [ 'addEmailToList' => App\Domain\Message\Mutation\AddEmailToListMessage::class, 'addEmailToList' => [ 'bus' => 'messenger.not-default-bus', \\ optional 'handler' => App\Domain\Handler\Mutation\AddEmailToListHandler::class, 'message' => App\Domain\Message\Mutation\AddEmailToListMessage::class, ], ], 'queries' => [ 'ping' => [ 'bus' => 'messenger.not-default-bus', \\ optional 'handler' => App\Domain\Handler\Query\PingHandler::class, 'message' => App\Domain\Message\Query\PingMessage::class, ], ], 'middleware' => [ 'allowedHeaders' => [ 'application/graphql', 'application/json', ], ], 'schema' => App\GraphQL\Schema::class, ];
In config.php
add the ConfigProcess.php
class to the post processors
$postProcessors = [ \Zestic\GraphQL\ConfigProcessor::class, ]; $aggregator = new ConfigAggregator([ ... ], $cacheConfig['config_cache_path'], $postProcessors); return $aggregator->getMergedConfig();
This will wire up the connections between the handlers and messages in Symfony Messenger
and it also builds the config for the RequestDispatcher