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
IGraphQLClientThe graphQl client to handle response data.
serializer
ISitecoreLayoutSerializerThe 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
SitecoreLayoutRequestThe request details.
handlerName
stringThe name of the request handler to use to handle the request.
Returns
- Task<SitecoreLayoutResponse>
The response of the request.