interface ResponseInterface in GraphQL 8.4
Response interface used for GraphQL responses.
Hierarchy
- interface \Drupal\graphql\GraphQL\Response\ResponseInterface
Expanded class hierarchy of ResponseInterface
All classes that implement ResponseInterface
2 files declare their use of ResponseInterface
- ComposableSchemaExampleExtension.php in examples/
graphql_composable/ src/ Plugin/ GraphQL/ SchemaExtension/ ComposableSchemaExampleExtension.php - PasswordReset.php in src/
Plugin/ GraphQL/ DataProducer/ User/ PasswordReset.php
File
- src/
GraphQL/ Response/ ResponseInterface.php, line 10
Namespace
Drupal\graphql\GraphQL\ResponseView source
interface ResponseInterface {
/**
* Adds the violation.
*
* @param string|\Drupal\Core\StringTranslation\TranslatableMarkup $message
* Violation message.
* @param array $properties
* Other properties related to the violation.
*/
public function addViolation($message, array $properties = []) : void;
/**
* Adds multiple violations.
*
* @param string[]|\Drupal\Core\StringTranslation\TranslatableMarkup[] $messages
* Violation messages.
* @param array $properties
* Other properties related to the violation.
*/
public function addViolations(array $messages, array $properties = []) : void;
/**
* Gets the violations.
*
* @return array
* Violations.
*/
public function getViolations() : array;
/**
* Adds the violations from another response to this response.
*/
public function mergeViolations(ResponseInterface $source) : void;
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ResponseInterface:: |
public | function | Adds the violation. | 1 |
ResponseInterface:: |
public | function | Adds multiple violations. | 1 |
ResponseInterface:: |
public | function | Gets the violations. | 1 |
ResponseInterface:: |
public | function | Adds the violations from another response to this response. | 1 |