Skip to content

Commit b54aa7f

Browse files
authored
Remove deprecated GraphQL::executeAndReturnResult() (#823)
1 parent 4ee52d3 commit b54aa7f

File tree

2 files changed

+1
-44
lines changed

2 files changed

+1
-44
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- PHP version required: 7.4+
55
- Removed deprecated `Type::getInternalTypes()`
66
- Remove deprecated `GraphQL::execute()`
7-
7+
- Remove deprecated `GraphQL::executeAndReturnResult()`
88

99
#### 14.6.1
1010

src/GraphQL.php

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -177,49 +177,6 @@ public static function promiseToExecute(
177177
}
178178
}
179179

180-
/**
181-
* @deprecated renamed to executeQuery()
182-
*
183-
* @param string|DocumentNode $source
184-
* @param mixed $rootValue
185-
* @param mixed $contextValue
186-
* @param mixed[]|null $variableValues
187-
*
188-
* @return ExecutionResult|Promise
189-
*
190-
* @codeCoverageIgnore
191-
*/
192-
public static function executeAndReturnResult(
193-
SchemaType $schema,
194-
$source,
195-
$rootValue = null,
196-
$contextValue = null,
197-
$variableValues = null,
198-
?string $operationName = null
199-
) {
200-
trigger_error(
201-
__METHOD__ . ' is deprecated, use GraphQL::executeQuery() as a quick replacement',
202-
E_USER_DEPRECATED
203-
);
204-
205-
$promiseAdapter = Executor::getPromiseAdapter();
206-
$result = self::promiseToExecute(
207-
$promiseAdapter,
208-
$schema,
209-
$source,
210-
$rootValue,
211-
$contextValue,
212-
$variableValues,
213-
$operationName
214-
);
215-
216-
if ($promiseAdapter instanceof SyncPromiseAdapter) {
217-
$result = $promiseAdapter->wait($result);
218-
}
219-
220-
return $result;
221-
}
222-
223180
/**
224181
* Returns directives defined in GraphQL spec
225182
*

0 commit comments

Comments
 (0)