You are here

public function ArticleResponse::setArticle in GraphQL 8.4

Same name in this branch
  1. 8.4 examples/graphql_composable/src/GraphQL/Response/ArticleResponse.php \Drupal\graphql_composable\GraphQL\Response\ArticleResponse::setArticle()
  2. 8.4 examples/graphql_composable/src/Wrappers/Response/ArticleResponse.php \Drupal\graphql_composable\Wrappers\Response\ArticleResponse::setArticle()

Sets the content.

Parameters

\Drupal\Core\Entity\EntityInterface|null $article: The article to be served.

File

examples/graphql_composable/src/GraphQL/Response/ArticleResponse.php, line 26

Class

ArticleResponse
Type of response used when an article is returned.

Namespace

Drupal\graphql_composable\GraphQL\Response

Code

public function setArticle(?EntityInterface $article) : void {
  $this->article = $article;
}