You are here

interface PayloadInterface in Open Social 10.3.x

Same name and namespace in other branches
  1. 10.0.x modules/custom/social_graphql/src/GraphQL/Payload/PayloadInterface.php \Drupal\social_graphql\GraphQL\Payload\PayloadInterface
  2. 10.1.x modules/custom/social_graphql/src/GraphQL/Payload/PayloadInterface.php \Drupal\social_graphql\GraphQL\Payload\PayloadInterface
  3. 10.2.x modules/custom/social_graphql/src/GraphQL/Payload/PayloadInterface.php \Drupal\social_graphql\GraphQL\Payload\PayloadInterface

Response interface used for GraphQL responses.

Hierarchy

Expanded class hierarchy of PayloadInterface

All classes that implement PayloadInterface

File

modules/custom/social_graphql/src/GraphQL/Payload/PayloadInterface.php, line 12

Namespace

Drupal\social_graphql\GraphQL\Payload
View source
interface PayloadInterface {

  /**
   * Adds the violation.
   *
   * @param \Drupal\social_graphql\GraphQL\ViolationInterface $violation
   *   A violation.
   *
   * @return $this
   *   This payload.
   */
  public function addViolation(ViolationInterface $violation) : self;

  /**
   * Adds multiple violations.
   *
   * @param array $violations
   *   An array of violations.
   *
   * @return $this
   *   This payload.
   */
  public function addViolations(array $violations) : self;

  /**
   * Gets the violations.
   *
   * @return \Drupal\social_graphql\GraphQL\ViolationInterface[]
   *   The Violations.
   */
  public function getViolations() : array;

}

Members

Namesort descending Modifiers Type Description Overrides
PayloadInterface::addViolation public function Adds the violation.
PayloadInterface::addViolations public function Adds multiple violations.
PayloadInterface::getViolations public function Gets the violations.