@@ -34,7 +34,7 @@ class Executor
34
34
private EventDispatcherInterface $ dispatcher ;
35
35
private PromiseAdapter $ promiseAdapter ;
36
36
private ExecutorInterface $ executor ;
37
- private bool $ useExperimentalExecutor ;
37
+ private bool $ useExperimentalExecutor ; // TODO: remove in 1.0
38
38
39
39
/**
40
40
* @var callable|null
@@ -46,13 +46,13 @@ public function __construct(
46
46
PromiseAdapter $ promiseAdapter ,
47
47
EventDispatcherInterface $ dispatcher ,
48
48
?callable $ defaultFieldResolver = null ,
49
- bool $ useExperimental = false
49
+ bool $ useExperimental = false // TODO: remove in 1.0
50
50
) {
51
51
$ this ->executor = $ executor ;
52
52
$ this ->promiseAdapter = $ promiseAdapter ;
53
53
$ this ->dispatcher = $ dispatcher ;
54
54
$ this ->defaultFieldResolver = $ defaultFieldResolver ;
55
- $ this ->useExperimentalExecutor = $ useExperimental ;
55
+ $ this ->useExperimentalExecutor = $ useExperimental ; // TODO: remove in 1.0
56
56
}
57
57
58
58
public function setExecutor (ExecutorInterface $ executor ): self
@@ -133,7 +133,10 @@ public function disableIntrospectionQuery(): void
133
133
*/
134
134
public function execute (?string $ schemaName , array $ request , $ rootValue = null ): ExecutionResult
135
135
{
136
- $ this ->useExperimentalExecutor ? GraphQL::useExperimentalExecutor () : GraphQL::useReferenceExecutor ();
136
+ // TODO: remove following if-block in 1.0
137
+ if (method_exists (GraphQL::class, 'useExperimentalExecutor ' )) {
138
+ $ this ->useExperimentalExecutor ? GraphQL::useExperimentalExecutor () : GraphQL::useReferenceExecutor ();
139
+ }
137
140
138
141
$ schema = $ this ->getSchema ($ schemaName );
139
142
/** @var string $schemaName */
0 commit comments