src/Subscriptions/Serializer.php
public function unserialize(string $context): GraphQLContext
    {
        [
            'request' => $rawRequest,
            'user' => $rawUser
        ] = unserialize($context);

        $request = new Request(
            $rawRequest['query'],
            $rawRequest['request'],
            $rawRequest['attributes'],
            $rawRequest['cookies'],
            $rawRequest['files'],
            $rawRequest['server'],
            $rawRequest['content']
        );

        $request->setUserResolver(
            function () use ($rawUser) {
                return unserialize($rawUser);
            }
        );

        return $this->createsContext->generate($request);
    }
public function unserialize(string $context): GraphQLContext
    {
        [
            'request' => $rawRequest,
            'user' => $rawUser
        ] = unserialize($context);

        $request = new Request(
            $rawRequest['query'],
            $rawRequest['request'],
            $rawRequest['attributes'],
            $rawRequest['cookies'],
            $rawRequest['files'],
            $rawRequest['server'],
            $rawRequest['content']
        );

        $request->setUserResolver(
            function () use ($rawUser) {
                return unserialize($rawUser);
            }
        );

        return $this->createsContext->generate($request);
    }
public function unserialize ( string $ context ) : GraphQLContext { [ 'request' => $ rawRequest , 'user' => $ rawUser ] = unserialize ( $ context ) ; $ request = new Request ( $ rawRequest [ 'query' ] , $ rawRequest [ 'request' ] , $ rawRequest [ 'attributes' ] , $ rawRequest [ 'cookies' ] , $ rawRequest [ 'files' ] , $ rawRequest [ 'server' ] , $ rawRequest [ 'content' ] ) ; $ request -> setUserResolver ( function ( ) use ( $ rawUser ) { return unserialize ( $ rawUser ) ; } ) ; return $ this -> createsContext -> generate ( $ request ) ; }
Unserialize the context.

@param  string  $context
@return \Nuwave\Lighthouse\Support\Contracts\GraphQLContext
Unserialize the context .