From 86fa8b1301a087a6715cb19dfe3cdd26823b5789 Mon Sep 17 00:00:00 2001 From: Bastian Konetzny Date: Thu, 16 Aug 2018 09:43:15 +0200 Subject: [PATCH] Fixed method signature in custom scalar docs --- docs/type-system/scalar-types.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 */}, ]); ```