GraphQL\Type\Definition\IntType::parseLiteral PHP Method

parseLiteral() public method

public parseLiteral ( $ast ) : integer | null
$ast
return integer | null
    public function parseLiteral($ast)
    {
        if ($ast instanceof IntValueNode) {
            $val = (int) $ast->value;
            if ($ast->value === (string) $val && self::MIN_INT <= $val && $val <= self::MAX_INT) {
                return $val;
            }
        }
        return null;
    }