You are here

public function ImageResourceUrl::resolve in GraphQL 8.4

Simply checks the url property in a given derivative result.

Parameters

array $derivative:

Return value

mixed

File

src/Plugin/GraphQL/DataProducer/Images/ImageResourceUrl.php, line 33

Class

ImageResourceUrl
Returns the URL of an image derivative.

Namespace

Drupal\graphql\Plugin\GraphQL\DataProducer\Images

Code

public function resolve(array $derivative) {
  return $derivative['url'] ?? '';
}