public function GraphQLFileTestTrait::getQuery in GraphQL 8.3
Retrieve the GraphQL query stored in a file as string.
Parameters
string $queryFile: The query file name.
Return value
string The graphql query string.
1 call to GraphQLFileTestTrait::getQuery()
- GraphQLFileTestTrait::requestWithQueryFile in tests/
src/ Traits/ GraphQLFileTestTrait.php - Run http subrequest with a specific query file.
File
- tests/
src/ Traits/ GraphQLFileTestTrait.php, line 33
Class
- GraphQLFileTestTrait
- Trait for running tests against GraphQL query files.
Namespace
Drupal\Tests\graphql\TraitsCode
public function getQuery($queryFile) {
return file_get_contents($this
->getQueriesDirectory() . '/' . $queryFile);
}