protected function HttpRequestTrait::batchedQueries in GraphQL 8.3
Same name and namespace in other branches
- 8.4 tests/src/Traits/HttpRequestTrait.php \Drupal\Tests\graphql\Traits\HttpRequestTrait::batchedQueries()
Simulate batched queries over http.
Parameters
string[] $queries: A set of queries to be executed in one go.
Return value
\Symfony\Component\HttpFoundation\Response The http response object.
4 calls to HttpRequestTrait::batchedQueries()
- PermissionsTest::testFullQueryAccess in tests/
src/ Kernel/ Framework/ PermissionsTest.php - Test access to arbitrary queries.
- PermissionsTest::testNoPermissions in tests/
src/ Kernel/ Framework/ PermissionsTest.php - Test if a user without permissions doesn't have access to any query.
- PermissionsTest::testPersistedQueryAccess in tests/
src/ Kernel/ Framework/ PermissionsTest.php - Test access to persisted queries.
- ResultTest::testBatchedQueries in tests/
src/ Kernel/ Framework/ ResultTest.php - Test a batched query result.
File
- tests/
src/ Traits/ HttpRequestTrait.php, line 57
Class
- HttpRequestTrait
- Test trait for the GraphQL HTTP interface.
Namespace
Drupal\Tests\graphql\TraitsCode
protected function batchedQueries($queries) {
return $this->container
->get('http_kernel')
->handle(Request::create('/graphql', 'POST', [], [], [], [], json_encode($queries)));
}