Table of Contents

Class GraphQlLayoutServiceHandler

Namespace
Sitecore.AspNetCore.SDK.LayoutService.Client.Request.Handlers.GraphQL
Assembly
Sitecore.AspNetCore.SDK.LayoutService.Client.dll

Supports making requests to the Sitecore layout service.

public class GraphQlLayoutServiceHandler : ILayoutRequestHandler
Inheritance
GraphQlLayoutServiceHandler
Implements
Inherited Members

Constructors

GraphQlLayoutServiceHandler(IGraphQLClient, ISitecoreLayoutSerializer, ILogger<GraphQlLayoutServiceHandler>)

Supports making requests to the Sitecore layout service.

public GraphQlLayoutServiceHandler(IGraphQLClient client, ISitecoreLayoutSerializer serializer, ILogger<GraphQlLayoutServiceHandler> logger)

Parameters

client IGraphQLClient

The graphQl client to handle response data.

serializer ISitecoreLayoutSerializer

The serializer to handle response data.

logger ILogger<GraphQlLayoutServiceHandler>

The ILogger to use for logging.

Methods

Request(SitecoreLayoutRequest, string)

Handles a request to the Sitecore layout service using the specified handler.

public Task<SitecoreLayoutResponse> Request(SitecoreLayoutRequest request, string handlerName)

Parameters

request SitecoreLayoutRequest

The request details.

handlerName string

The name of the request handler to use to handle the request.

Returns

Task<SitecoreLayoutResponse>

The response of the request.