Releases: bwaidelich/Wwwision.GraphQL
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
Flow 4.0 Compatibility
With recent core migrations applied this package is now ready to be used with Flow 4.0 / Neos 3.0
GraphiQL v0.8.1, graphql-php v0.8.0
Updates the depending libraries:
GraphiQL JS lib: 0.6.6 to 0.8.1
webonyx/graphql-php 0.6 to 0.8
Log query exceptions
The GraphQL library I use (webonyx/graphql-php) conveniently
converts any exceptions into a GraphQL "error result".
This leads to the exception handler not being triggered any longer.
With this change any exception that occurs during processing of a GraphQL
query is logged using the Flow SystemLogger
.
Bugfix-Release: Support multiple variable formats
BUGFIX: Support multiple variable formats
Previously the only format the HTTP endpoint support for
the variables is a JSON-serialized string:
{
"query": "<some-query>",
"variables": "{\"id\": \"123\"}"
// ...
}
With this change, unserialized JSON objects are supported, too:
{
"query": "<some-query>",
"variables": {
"id": "123"
}
// ...
}
Note: I couldn't find anything about this in the GraphQL spec.
The GraphiQL IDE sends the variables serialized, but other endpoints
seem to support both formats.
Support for OPTIONS request
Adds a simple HTTP Component that responds to OPTIONS request with
a corresponding HTTP response if a corresponding endpoint is configured:
HTTP/1.1 200 OK
Allow: GET, POST
Content-Length: 0
Downgrade GraphiQL JS lib
This is a bugfix release, downgrading GraphiQL JS lib to v0.6.6
The previous update to v0.7.3 was not compatible with the
webonyx/graphql-php
package version we currently have (0.6).
Note: With this release I also decided to introduce the patch level release number in order to be able to follow semantic versioning
Improved Error handling, new GraphiQL version
- Use custom View implementation to render query result and convert exceptions (hiding exception message and providing status-, exception- and reference code)
- Update GraphiQL JS library to 0.7.3
New GraphiQL version
This release just ships the latest GraphiQL JavaScript library
One is a lonely number
The first release of this package