Class GraphQlLayoutServiceHandler
Version: 21.x
Supports making requests to the Sitecore layout service.
Inheritance
System.Object
GraphQlLayoutServiceHandler
Namespace: Sitecore.LayoutService.Client.RequestHandlers.GraphQL
Assembly: Sitecore.LayoutService.Client.dll
Syntax
RequestResponse
public class GraphQlLayoutServiceHandler : Object, ILayoutRequestHandlerConstructors
GraphQlLayoutServiceHandler(IGraphQLClient, ISitecoreLayoutSerializer, ILogger<GraphQlLayoutServiceHandler>)
Initializes a new instance of the GraphQlLayoutServiceHandler class.
Declaration
RequestResponse
public GraphQlLayoutServiceHandler(IGraphQLClient client, ISitecoreLayoutSerializer serializer, ILogger<GraphQlLayoutServiceHandler> logger)Parameters
| Type | Name | Description |
|---|---|---|
| GraphQL.Client.Abstractions.IGraphQLClient | client |
The graphQl client to handle response data. |
| ISitecoreLayoutSerializer | serializer |
The serializer to handle response data. |
| Microsoft.Extensions.Logging.ILogger<GraphQlLayoutServiceHandler> | logger |
The Microsoft.Extensions.Logging.ILogger to use for logging. |
Methods
Dispose()
Dispose GraphQLClient.
Declaration
RequestResponse
public void Dispose()Request(SitecoreLayoutRequest, String)
Handles a request to the Sitecore layout service using the specified handler.
Declaration
RequestResponse
public Task<SitecoreLayoutResponse> Request(SitecoreLayoutRequest request, string handlerName)Parameters
| Type | Name | Description |
|---|---|---|
| SitecoreLayoutRequest | request |
The request details. |
| System.String | handlerName |
The name of the request handler to use to handle the request. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<SitecoreLayoutResponse> |
The response of the request. |
Implements
System.IDisposable