mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 12:56:05 +03:00
Fixed method signature in custom scalar docs
This commit is contained in:
parent
cc39b3ecbf
commit
86fa8b1301
@ -96,10 +96,11 @@ class EmailType extends ScalarType
|
|||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* @param \GraphQL\Language\AST\Node $valueNode
|
* @param \GraphQL\Language\AST\Node $valueNode
|
||||||
|
* @param array|null $variables
|
||||||
* @return string
|
* @return string
|
||||||
* @throws Error
|
* @throws Error
|
||||||
*/
|
*/
|
||||||
public function parseLiteral($valueNode)
|
public function parseLiteral($valueNode, array $variables = null)
|
||||||
{
|
{
|
||||||
// Note: throwing GraphQL\Error\Error vs \UnexpectedValueException to benefit from GraphQL
|
// Note: throwing GraphQL\Error\Error vs \UnexpectedValueException to benefit from GraphQL
|
||||||
// error location in query:
|
// error location in query:
|
||||||
@ -124,6 +125,6 @@ $emailType = new CustomScalarType([
|
|||||||
'name' => 'Email',
|
'name' => 'Email',
|
||||||
'serialize' => function($value) {/* See function body above */},
|
'serialize' => function($value) {/* See function body above */},
|
||||||
'parseValue' => function($value) {/* See function body above */},
|
'parseValue' => function($value) {/* See function body above */},
|
||||||
'parseLiteral' => function($valueNode) {/* See function body above */},
|
'parseLiteral' => function($valueNode, array $variables = null) {/* See function body above */},
|
||||||
]);
|
]);
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user