Access to HTTP Request in resolvers
This release comes with one new main feature: A custom GraphQLContext
that is available in all resolvers and allows access to the current HTTP request:
<?php
// ...
use Wwwision\GraphQL\GraphQLContext;
// ...
'resolve' => function ($value, array $args, GraphQLContext $context) {
$baseUri = $context->getHttpRequest()->getBaseUri();
// ...
},
Apart from that this update incorporates some smaller improvements:
- FEATURE: Upgrade GraphiQL JS lib to v0.10.2
- FEATURE: Upgrade webonyx/graphql-php to 0.9.8
- TASK: Add unit test for HttpOptionsComponent
- TASK: Explicitly set the query action format to JSON
- TASK: Cosmetic fix to default Settings
- TASK: Mention Options HTTP Component in
README