diff --git a/docs/type-system/scalar-types.md b/docs/type-system/scalar-types.md index 2f79387..3029238 100644 --- a/docs/type-system/scalar-types.md +++ b/docs/type-system/scalar-types.md @@ -96,10 +96,11 @@ class EmailType extends ScalarType * } * * @param \GraphQL\Language\AST\Node $valueNode + * @param array|null $variables * @return string * @throws Error */ - public function parseLiteral($valueNode) + public function parseLiteral($valueNode, array $variables = null) { // Note: throwing GraphQL\Error\Error vs \UnexpectedValueException to benefit from GraphQL // error location in query: @@ -124,6 +125,6 @@ $emailType = new CustomScalarType([ 'name' => 'Email', 'serialize' => 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 */}, ]); ```