protected function ThunderEntityList::resolve in Thunder 6.2.x
Resolve entity query.
Parameters
string $type: Entity type.
string[] $bundles: List of bundles to be filtered.
int $offset: Query only entities owned by current user.
int $limit: Maximum number of queried entities.
array $conditions: List of conditions to filter the entities.
string[] $languages: Languages for queried entities.
array $sortBy: List of sorts.
\Drupal\graphql\GraphQL\Execution\FieldContext $cacheContext: The caching context related to the current field.
Return value
\Drupal\thunder_gqls\Wrappers\EntityListResponse Base entity list response.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
File
- modules/
thunder_gqls/ src/ Plugin/ GraphQL/ DataProducer/ ThunderEntityList.php, line 87
Class
- ThunderEntityList
- The entity list producer class.
Namespace
Drupal\thunder_gqls\Plugin\GraphQL\DataProducerCode
protected function resolve(string $type, array $bundles, int $offset, int $limit, array $conditions, array $languages, array $sortBy, FieldContext $cacheContext) : EntityListResponse {
$query = $this
->query($type, $bundles, $offset, $limit, $conditions, $languages, $sortBy, $cacheContext);
return new EntityListResponse($query);
}