src/Subscriptions/Subscriber.php
public function unserialize($subscription): self
    {
        $data = json_decode($subscription, true);

        $this->operationName = $data['operation_name'];
        $this->channel = $data['channel'];
        $this->args = $data['args'];
        $this->context = $this->contextSerializer()->unserialize(
            $data['context']
        );
        $this->query = AST::fromArray(
            unserialize($data['query'])
        );

        return $this;
    }
public function unserialize($subscription): self
    {
        $data = json_decode($subscription, true);

        $this->operationName = $data['operation_name'];
        $this->channel = $data['channel'];
        $this->args = $data['args'];
        $this->context = $this->contextSerializer()->unserialize(
            $data['context']
        );
        $this->query = AST::fromArray(
            unserialize($data['query'])
        );

        return $this;
    }
public function unserialize ( $ subscription ) : self { $ data = json_decode ( $ subscription , true ) ; $ this -> operationName = $ data [ 'operation_name' ] ; $ this -> channel = $ data [ 'channel' ] ; $ this -> args = $ data [ 'args' ] ; $ this -> context = $ this -> contextSerializer ( ) -> unserialize ( $ data [ 'context' ] ) ; $ this -> query = AST :: fromArray ( unserialize ( $ data [ 'query' ] ) ) ; return $ this ; }
Unserialize subscription from a JSON string.

@param  string  $subscription
@return $this
Unserialize subscription from a JSON string .