protected function HttpRequestTrait::persistedQuery in GraphQL 8.3
Issue a persisted query over http.
Parameters
$id: The query id.
array $variables: Query variables.
Return value
\Symfony\Component\HttpFoundation\Response The http response object.
2 calls to HttpRequestTrait::persistedQuery()
- ResultCacheTest::testPersistedQuery in tests/
src/ Kernel/ Framework/ ResultCacheTest.php - Test persisted query handling.
- ResultTest::testPersistedQuery in tests/
src/ Kernel/ Framework/ ResultTest.php - Test a persisted query result.
File
- tests/
src/ Traits/ HttpRequestTrait.php, line 41
Class
- HttpRequestTrait
- Test trait for the GraphQL HTTP interface.
Namespace
Drupal\Tests\graphql\TraitsCode
protected function persistedQuery($id, array $variables = []) {
return $this->container
->get('http_kernel')
->handle(Request::create('/graphql', 'GET', [
'queryId' => $id,
'variables' => $variables,
]));
}