src/Subscriptions/Serializer.php
public function serialize(GraphQLContext $context): string
    {
        $request = $context->request();

        return serialize([
            'request' => [
                'query' => $request->query->all(),
                'request' => $request->request->all(),
                'attributes' => $request->attributes->all(),
                'cookies' => [],
                'files' => [],
                'server' => Arr::except($request->server->all(), ['HTTP_AUTHORIZATION']),
                'content' => $request->getContent(),
            ],
            'user' => serialize($context->user()),
        ]);
    }
public function serialize(GraphQLContext $context): string
    {
        $request = $context->request();

        return serialize([
            'request' => [
                'query' => $request->query->all(),
                'request' => $request->request->all(),
                'attributes' => $request->attributes->all(),
                'cookies' => [],
                'files' => [],
                'server' => Arr::except($request->server->all(), ['HTTP_AUTHORIZATION']),
                'content' => $request->getContent(),
            ],
            'user' => serialize($context->user()),
        ]);
    }
public function serialize ( GraphQLContext $ context ) : string { $ request = $ context -> request ( ) ; return serialize ( [ 'request' => [ 'query' => $ request -> query -> all ( ) , 'request' => $ request -> request -> all ( ) , 'attributes' => $ request -> attributes -> all ( ) , 'cookies' => [ ] , 'files' => [ ] , 'server' => Arr :: except ( $ request -> server -> all ( ) , [ 'HTTP_AUTHORIZATION' ] ) , 'content' => $ request -> getContent ( ) , ] , 'user' => serialize ( $ context -> user ( ) ) , ] ) ; }
Serialize the context.

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