| Current Path : /home/eolienneia/www/templates/yootheme/vendor/yootheme/graphql/lib/Type/Definition/ |
| Current File : /home/eolienneia/www/templates/yootheme/vendor/yootheme/graphql/lib/Type/Definition/LeafType.php |
<?php
namespace YOOtheme\GraphQL\Type\Definition;
use YOOtheme\GraphQL\Error\Error;
use YOOtheme\GraphQL\Language\AST\Node;
/*
export type GraphQLLeafType =
GraphQLScalarType |
GraphQLEnumType;
*/
interface LeafType
{
/**
* Serializes an internal value to include in a response.
*
* @param mixed $value
* @return mixed
* @throws Error
*/
public function serialize($value);
/**
* Parses an externally provided value (query variable) to use as an input
*
* In the case of an invalid value this method must throw an Exception
*
* @param mixed $value
* @return mixed
* @throws Error
*/
public function parseValue($value);
/**
* Parses an externally provided literal value (hardcoded in GraphQL query) to use as an input
*
* In the case of an invalid node or value this method must throw an Exception
*
* @param Node $valueNode
* @param array|null $variables
* @return mixed
* @throws \Exception
*/
public function parseLiteral($valueNode, array $variables = null);
}