Added a note about experimental executor in the changelog

This commit is contained in:
Vladimir Razuvaev 2018-11-27 15:51:53 +07:00
parent e1b4d438db
commit 54263d50c0
2 changed files with 26 additions and 1 deletions

View File

@ -3,11 +3,18 @@
This release brings several breaking changes. Please refer to [UPGRADE](UPGRADE.md) document for details. This release brings several breaking changes. Please refer to [UPGRADE](UPGRADE.md) document for details.
New features and notable changes: New features and notable changes:
- New experimental executor with improved performance (#314).<br>
It is a one-line switch: `GraphQL::useExperimentalExecutor()`.<br>
<br>
**Please try it and post your feedback at https://github.com/webonyx/graphql-php/issues/397**
(as it may become the default one in future)
<br>
<br>
- Spec compliance: error category, debug information and extensions are displayed under `extensions` key - Spec compliance: error category, debug information and extensions are displayed under `extensions` key
- `AbstractValidationRule` renamed to `ValidationRule` (NS `GraphQL\Validator\Rules`) - `AbstractValidationRule` renamed to `ValidationRule` (NS `GraphQL\Validator\Rules`)
- `AbstractQuerySecurity` renamed to `QuerySecurityRule` (NS `GraphQL\Validator\Rules`) - `AbstractQuerySecurity` renamed to `QuerySecurityRule` (NS `GraphQL\Validator\Rules`)
- `FindBreakingChanges` renamed to `BreakingChangesFinder` (NS `GraphQL\Utils`) - `FindBreakingChanges` renamed to `BreakingChangesFinder` (NS `GraphQL\Utils`)
- Added ability to override standard types via `GraphQL::overrideStandardTypes(array $types)` - Added ability to override standard types via `GraphQL::overrideStandardTypes(array $types)` (#401)
#### v0.12.5 #### v0.12.5
- Execution performance optimization for lists - Execution performance optimization for lists

View File

@ -10,6 +10,8 @@ use GraphQL\Executor\Executor;
use GraphQL\Executor\Promise\Adapter\SyncPromiseAdapter; use GraphQL\Executor\Promise\Adapter\SyncPromiseAdapter;
use GraphQL\Executor\Promise\Promise; use GraphQL\Executor\Promise\Promise;
use GraphQL\Executor\Promise\PromiseAdapter; use GraphQL\Executor\Promise\PromiseAdapter;
use GraphQL\Executor\ReferenceExecutor;
use GraphQL\Experimental\Executor\CoroutineExecutor;
use GraphQL\Language\AST\DocumentNode; use GraphQL\Language\AST\DocumentNode;
use GraphQL\Language\Parser; use GraphQL\Language\Parser;
use GraphQL\Language\Source; use GraphQL\Language\Source;
@ -319,6 +321,22 @@ class GraphQL
Executor::setPromiseAdapter($promiseAdapter); Executor::setPromiseAdapter($promiseAdapter);
} }
/**
* Experimental: Switch to the new executor
*/
public static function useExperimentalExecutor()
{
Executor::setImplementationFactory([CoroutineExecutor::class, 'create']);
}
/**
* Experimental: Switch back to the default executor
*/
public static function useReferenceExecutor()
{
Executor::setImplementationFactory([ReferenceExecutor::class, 'create']);
}
/** /**
* Returns directives defined in GraphQL spec * Returns directives defined in GraphQL spec
* *