src/Subscriptions/Subscriber.php
public function serialize()
    {
        return json_encode([
            'operation_name' => $this->operationName,
            'channel' => $this->channel,
            'args' => $this->args,
            'context' => $this->contextSerializer()->serialize($this->context),
            'query' => serialize(
                AST::toArray($this->query)
            ),
        ]);
    }
public function serialize()
    {
        return json_encode([
            'operation_name' => $this->operationName,
            'channel' => $this->channel,
            'args' => $this->args,
            'context' => $this->contextSerializer()->serialize($this->context),
            'query' => serialize(
                AST::toArray($this->query)
            ),
        ]);
    }
public function serialize ( ) { return json_encode ( [ 'operation_name' => $ this -> operationName , 'channel' => $ this -> channel , 'args' => $ this -> args , 'context' => $ this -> contextSerializer ( ) -> serialize ( $ this -> context ) , 'query' => serialize ( AST :: toArray ( $ this -> query ) ) , ] ) ; }
Convert this into a JSON string.

@return false|string
Convert this into a JSON string .