Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bb946a5
MetaData Config & Render calls configured
robearlam Nov 28, 2024
3c023f6
Configured metadata render method to correctly render page using new …
robearlam Dec 6, 2024
5a1d70d
Moved GQL logic out of LC.CLient and back into Pages logic. Introduce…
robearlam Dec 11, 2024
1c8752e
Wired up Placeholder and Rendering chromes
robearlam Dec 16, 2024
bd0dcde
Metadata editing now working
robearlam Jan 22, 2025
2b99fc6
Wired up EditingDictionaryQuery requests
robearlam Jan 29, 2025
5f34722
Fixed failing unit tests
robearlam Jan 31, 2025
5494e8e
Added UnitTests for EditingScriptsTagHelper
robearlam Feb 3, 2025
d007e5b
Added UnitTests for Pages GQL Factory, and RenderingEngine TagHelpers
robearlam Feb 4, 2025
b92f31d
ComponentName is now persisted in rendering collection, to be returne…
robearlam Feb 5, 2025
01a9228
Added UnitTests for Pages Config Middleware
robearlam Feb 5, 2025
5be1780
Added Unit Tests for Pages Setup Render Middleware call
robearlam Feb 5, 2025
4ea37ae
Added UniTests for GraphQLEditingServiceHandler
robearlam Feb 10, 2025
ddb0716
Added UniTests for EditingChromes being added to response for Pages r…
robearlam Feb 17, 2025
328561f
Restructured test for Pages config middleware
robearlam Feb 17, 2025
c2851cb
Fixed bug with ImageTagHelper and ViewCompponent
robearlam Mar 4, 2025
4d1c1dd
Moved PagesSetupMiddleware in a Controller, other small fixes
robearlam Mar 14, 2025
9e5608e
Moved log messages into Resources RESX
robearlam Mar 14, 2025
fb2f772
Added Resources RESX to Pages project
robearlam Mar 14, 2025
d0938ba
Refactored PlaceHolder processing to use Stack approach instead of re…
robearlam Mar 14, 2025
d380f8e
Improved logic controlling when Pages middleware executes
robearlam Mar 16, 2025
4570f44
Moved Dictionary functionality out of PagesGQLHandler into dedicated …
robearlam Mar 25, 2025
fa5202e
Removed GraphQlClient used for EditingHandler, added GraphQLClient wi…
robearlam Mar 26, 2025
f8eee28
Changed to no longer persist component names for predicate registrati…
robearlam Mar 26, 2025
ac8a933
Code TidyUp, fixed all warnings
robearlam Mar 26, 2025
1af1068
Removed ID property from EdtiableField as didnt need to be added
robearlam Mar 26, 2025
af13261
Created Integration tests for PagesSetupController
robearlam Mar 28, 2025
8109f8b
Added Integration test for succesful call to get editing layout with …
robearlam Apr 1, 2025
0a08769
Added csproj missing from previous commit
robearlam Apr 1, 2025
17e0b09
Improved logic for when to enable editing of Fields in MetaData editi…
robearlam Apr 1, 2025
21f0e77
Added handling for /config route OPTIONS request
robearlam Apr 7, 2025
4371c24
Fixed correct component naming for ViewComponents and PartialViews
robearlam Apr 7, 2025
17e6f29
Aligned empty placeholder classname with jss
robearlam Apr 22, 2025
8fd259f
Fixed issue with rendering of empty nested placeholders due to incorr…
robearlam Apr 22, 2025
0bc23b7
Style refactor
IvanLieckens May 26, 2025
64cb3d7
Fixed incorrect error being thrown from Config call
robearlam May 26, 2025
8cfecbf
Changes from PR Review
robearlam May 27, 2025
7e2b893
Moved MetaData Queries back from constants to improve readability
robearlam May 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Sitecore.AspNetCore.SDK.sln
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ISSUE_TEMPLATE", "ISSUE_TEM
.github\ISSUE_TEMPLATE\Question.yml = .github\ISSUE_TEMPLATE\Question.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sitecore.AspNetCore.SDK.Pages", "src\Sitecore.AspNetCore.SDK.Pages\Sitecore.AspNetCore.SDK.Pages.csproj", "{F33DC6F7-83F8-41CE-852C-8279D1266139}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sitecore.AspNetCore.SDK.Pages.Tests", "tests\Sitecore.AspNetCore.SDK.Pages.Tests\Sitecore.AspNetCore.SDK.Pages.Tests.csproj", "{55601B5C-5D9C-66E5-801D-E5D5EA0E29D6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -186,6 +190,14 @@ Global
{100C07C6-C68D-469F-9F15-139CB48CB7F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{100C07C6-C68D-469F-9F15-139CB48CB7F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{100C07C6-C68D-469F-9F15-139CB48CB7F0}.Release|Any CPU.Build.0 = Release|Any CPU
{F33DC6F7-83F8-41CE-852C-8279D1266139}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F33DC6F7-83F8-41CE-852C-8279D1266139}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F33DC6F7-83F8-41CE-852C-8279D1266139}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F33DC6F7-83F8-41CE-852C-8279D1266139}.Release|Any CPU.Build.0 = Release|Any CPU
{55601B5C-5D9C-66E5-801D-E5D5EA0E29D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55601B5C-5D9C-66E5-801D-E5D5EA0E29D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55601B5C-5D9C-66E5-801D-E5D5EA0E29D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55601B5C-5D9C-66E5-801D-E5D5EA0E29D6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -221,6 +233,8 @@ Global
{100C07C6-C68D-469F-9F15-139CB48CB7F0} = {BDE3D3B9-8291-4AE9-B8DA-868CEBCBDC4D}
{1706E43D-AC19-4FBB-9BFB-18A8B195580A} = {5FE82369-DEF2-4136-B74F-6E86DB91050E}
{24CCC156-046B-4600-9DB0-FC3269A18747} = {5FE82369-DEF2-4136-B74F-6E86DB91050E}
{F33DC6F7-83F8-41CE-852C-8279D1266139} = {75482B5D-21E2-4DBE-BE78-657ECF0D409F}
{55601B5C-5D9C-66E5-801D-E5D5EA0E29D6} = {BDE3D3B9-8291-4AE9-B8DA-868CEBCBDC4D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2E4F7126-B772-42CB-8F90-93B221ED0A72}
Expand Down
3 changes: 3 additions & 0 deletions Sitecore.AspNetCore.SDK.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=EE/@EntryIndexedValue">EE</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=QL/@EntryIndexedValue">QL</s:String></wpf:ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Sitecore.AspNetCore.SDK.GraphQL.Client.Models;
/// <summary>
/// GraphQL Client options needed for Preview or Edge schemas.
/// </summary>
public class SitecoreGraphQlClientOptions : GraphQLHttpClientOptions
public class SitecoreGraphQLClientOptions : GraphQLHttpClientOptions
{
/// <summary>
/// ContextId query string key.
Expand Down Expand Up @@ -35,12 +35,12 @@ public class SitecoreGraphQlClientOptions : GraphQLHttpClientOptions
public string? ContextId { get; set; }

/// <summary>
/// Gets or sets Default site name, used by middlewares which use GraphQl client.
/// Gets or sets Default site name, used by middlewares which use GraphQL client.
/// </summary>
public string? DefaultSiteName { get; set; }

/// <summary>
/// Gets or sets GraphQLJsonSerializer, which could be SystemTextJsonSerializer or NewtonsoftJsonSerializer, SystemTextJsonSerializer by default.
/// </summary>
public IGraphQLWebsocketJsonSerializer GraphQlJsonSerializer { get; set; } = new SystemTextJsonSerializer();
public IGraphQLWebsocketJsonSerializer GraphQLJsonSerializer { get; set; } = new SystemTextJsonSerializer();
}
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
namespace Sitecore.AspNetCore.SDK.GraphQL.Exceptions;

/// <summary>
/// Details an exception that may occur during GraphQl configuration.
/// Details an exception that may occur during GraphQL configuration.
/// </summary>
public class InvalidGraphQlConfigurationException : Exception
public class InvalidGraphQLConfigurationException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="InvalidGraphQlConfigurationException"/> class.
/// Initializes a new instance of the <see cref="InvalidGraphQLConfigurationException"/> class.
/// </summary>
public InvalidGraphQlConfigurationException()
public InvalidGraphQLConfigurationException()
{
}

/// <summary>
/// Initializes a new instance of the <see cref="InvalidGraphQlConfigurationException"/> class.
/// Initializes a new instance of the <see cref="InvalidGraphQLConfigurationException"/> class.
/// </summary>
/// <param name="message">The exception message.</param>
public InvalidGraphQlConfigurationException(string message)
public InvalidGraphQLConfigurationException(string message)
: base(message)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="InvalidGraphQlConfigurationException"/> class.
/// Initializes a new instance of the <see cref="InvalidGraphQLConfigurationException"/> class.
/// </summary>
/// <param name="message">The exception message.</param>
/// <param name="innerException">The inner exception to be wrapped.</param>
public InvalidGraphQlConfigurationException(string message, Exception innerException)
public InvalidGraphQLConfigurationException(string message, Exception innerException)
: base(message, innerException)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,37 @@ namespace Sitecore.AspNetCore.SDK.GraphQL.Extensions;
/// <summary>
/// Sitemap configuration.
/// </summary>
public static class GraphQlConfigurationExtensions
public static class GraphQLConfigurationExtensions
{
/// <summary>
/// Configuration for GraphQLClient.
/// </summary>
/// <param name="services">The <see cref="IServiceCollection" /> to add services to.</param>
/// <param name="configuration">The <see cref="SitecoreGraphQlClientOptions" /> configuration for GraphQL client.</param>
/// <param name="configuration">The <see cref="SitecoreGraphQLClientOptions" /> configuration for GraphQL client.</param>
/// <returns>The <see cref="IServiceCollection"/> so that additional calls can be chained.</returns>
public static IServiceCollection AddGraphQlClient(this IServiceCollection services, Action<SitecoreGraphQlClientOptions> configuration)
public static IServiceCollection AddGraphQLClient(this IServiceCollection services, Action<SitecoreGraphQLClientOptions> configuration)
{
ArgumentNullException.ThrowIfNull(services);
ArgumentNullException.ThrowIfNull(configuration);

services.Configure(configuration);

SitecoreGraphQlClientOptions options = TryGetConfiguration(configuration);
SitecoreGraphQLClientOptions options = TryGetConfiguration(configuration);

services.AddSingleton<IGraphQLClient, GraphQLHttpClient>(_ =>
{
if (!string.IsNullOrWhiteSpace(options.ContextId))
{
options.EndPoint = options.EndPoint.AddQueryString(
SitecoreGraphQlClientOptions.ContextIdQueryStringKey,
SitecoreGraphQLClientOptions.ContextIdQueryStringKey,
options.ContextId);
}

GraphQLHttpClient graphQlHttpClient = new(options.EndPoint!, options.GraphQlJsonSerializer);
GraphQLHttpClient graphQlHttpClient = new(options.EndPoint!, options.GraphQLJsonSerializer);

if (!string.IsNullOrWhiteSpace(options.ApiKey))
{
graphQlHttpClient.HttpClient.DefaultRequestHeaders.Add(SitecoreGraphQlClientOptions.ApiKeyHeaderName, options.ApiKey);
graphQlHttpClient.HttpClient.DefaultRequestHeaders.Add(SitecoreGraphQLClientOptions.ApiKeyHeaderName, options.ApiKey);
}

return graphQlHttpClient;
Expand All @@ -49,23 +49,23 @@ public static IServiceCollection AddGraphQlClient(this IServiceCollection servic
return services;
}

private static SitecoreGraphQlClientOptions TryGetConfiguration(Action<SitecoreGraphQlClientOptions> configuration)
private static SitecoreGraphQLClientOptions TryGetConfiguration(Action<SitecoreGraphQLClientOptions> configuration)
{
SitecoreGraphQlClientOptions options = new();
SitecoreGraphQLClientOptions options = new();
configuration.Invoke(options);

if (string.IsNullOrWhiteSpace(options.ApiKey) && string.IsNullOrWhiteSpace(options.ContextId))
{
throw new InvalidGraphQlConfigurationException(Resources.Exception_MissingApiKeyAndContextId);
throw new InvalidGraphQLConfigurationException(Resources.Exception_MissingApiKeyAndContextId);
}

if (options.EndPoint == null && !string.IsNullOrWhiteSpace(options.ContextId))
{
options.EndPoint = SitecoreGraphQlClientOptions.DefaultEdgeEndpoint;
options.EndPoint = SitecoreGraphQLClientOptions.DefaultEdgeEndpoint;
}
else if (options.EndPoint == null)
{
throw new InvalidGraphQlConfigurationException(Resources.Exception_MissingEndpoint);
throw new InvalidGraphQLConfigurationException(Resources.Exception_MissingEndpoint);
}

return options;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using GraphQL.Client.Abstractions;
using GraphQL.Client.Http;

namespace Sitecore.AspNetCore.SDK.GraphQL.Request
{
/// <summary>
/// GraphQLHttpRequestWithHeaders is a class that extends GraphQLHttpRequest. It is designed to handle GraphQL HTTP
/// requests with additional header support.
/// </summary>
public class GraphQLHttpRequestWithHeaders : GraphQLHttpRequest
{
/// <summary>
/// Gets or sets a dictionary that stores key-value pairs of headers, where both keys and values are strings. It allows for
/// easy access and manipulation of header information.
/// </summary>
public Dictionary<string, string> Headers { get; set; } = [];

/// <summary>
/// Converts the current instance into an HTTP request message for GraphQL operations.
/// </summary>
/// <param name="options">Specifies configuration options for the GraphQL HTTP client.</param>
/// <param name="serializer">Defines the method for serializing GraphQL requests and responses.</param>
/// <returns>Returns an HTTP request message with the necessary headers for the GraphQL operation.</returns>
public override HttpRequestMessage ToHttpRequestMessage(GraphQLHttpClientOptions options, IGraphQLJsonSerializer serializer)
{
HttpRequestMessage request = base.ToHttpRequestMessage(options, serializer);

foreach (string headerKey in Headers.Keys)
{
request.Headers.Add(headerKey, Headers[headerKey]);
}

return request;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ public static ILayoutRequestHandlerBuilder<THandler> AddHandler<THandler>(
/// <param name="builder">The <see cref="ISitecoreLayoutClientBuilder"/> being configured.</param>
/// <param name="name">The name used to identify the handler.</param>
/// <param name="siteName">The siteName used to identify the handler.</param>
/// <param name="apiKey">The apiKey to access graphQl endpoint.</param>
/// <param name="uri">GraphQl endpoint uri.</param>
/// <param name="defaultLanguage">Default language for GraphQl requests.</param>
/// <param name="apiKey">The apiKey to access graphQL endpoint.</param>
/// <param name="uri">GraphQL endpoint uri.</param>
/// <param name="defaultLanguage">Default language for GraphQL requests.</param>
/// <returns>The <see cref="ILayoutRequestHandlerBuilder{THandler}"/> so that additional calls can be chained.</returns>
public static ILayoutRequestHandlerBuilder<GraphQlLayoutServiceHandler> AddGraphQlHandler(
public static ILayoutRequestHandlerBuilder<GraphQLLayoutServiceHandler> AddGraphQLHandler(
this ISitecoreLayoutClientBuilder builder,
string name,
string siteName,
Expand Down Expand Up @@ -101,11 +101,11 @@ public static ILayoutRequestHandlerBuilder<GraphQlLayoutServiceHandler> AddGraph
}
});
return builder.AddHandler(name, sp
=> ActivatorUtilities.CreateInstance<GraphQlLayoutServiceHandler>(
=> ActivatorUtilities.CreateInstance<GraphQLLayoutServiceHandler>(
sp,
sp.GetRequiredKeyedService<IGraphQLClient>(name),
sp.GetRequiredService<ISitecoreLayoutSerializer>(),
sp.GetRequiredService<ILogger<GraphQlLayoutServiceHandler>>()));
sp.GetRequiredService<ILogger<GraphQLLayoutServiceHandler>>()));
}

/// <summary>
Expand All @@ -114,9 +114,9 @@ public static ILayoutRequestHandlerBuilder<GraphQlLayoutServiceHandler> AddGraph
/// <param name="builder">The <see cref="ISitecoreLayoutClientBuilder"/> being configured.</param>
/// <param name="name">The name used to identify the handler.</param>
/// <param name="siteName">The siteName used to identify the handler.</param>
/// <param name="defaultLanguage">Default language for GraphQl requests.</param>
/// <param name="defaultLanguage">Default language for GraphQL requests.</param>
/// <returns>The <see cref="ILayoutRequestHandlerBuilder{THandler}"/> so that additional calls can be chained.</returns>
public static ILayoutRequestHandlerBuilder<GraphQlLayoutServiceHandler> AddGraphQlHandler(
public static ILayoutRequestHandlerBuilder<GraphQLLayoutServiceHandler> AddGraphQLHandler(
this ISitecoreLayoutClientBuilder builder,
string name,
string siteName,
Expand All @@ -138,11 +138,11 @@ public static ILayoutRequestHandlerBuilder<GraphQlLayoutServiceHandler> AddGraph
}
});
return builder.AddHandler(name, sp
=> ActivatorUtilities.CreateInstance<GraphQlLayoutServiceHandler>(
=> ActivatorUtilities.CreateInstance<GraphQLLayoutServiceHandler>(
sp,
sp.GetRequiredService<IGraphQLClient>(),
sp.GetRequiredService<ISitecoreLayoutSerializer>(),
sp.GetRequiredService<ILogger<GraphQlLayoutServiceHandler>>()));
sp.GetRequiredService<ILogger<GraphQLLayoutServiceHandler>>()));
}

/// <summary>
Expand Down Expand Up @@ -310,11 +310,11 @@ public static ILayoutRequestHandlerBuilder<HttpLayoutRequestHandler> AddHttpHand
/// <param name="builder">The <see cref="ISitecoreLayoutClientBuilder"/> being configured.</param>
/// <param name="name">The name used to identify the handler.</param>
/// <param name="contextId">The context identifier to access graphQl endpoint.</param>
/// <param name="uri">GraphQl endpoint uri.</param>
/// <param name="uri">GraphQL endpoint uri.</param>
/// <param name="siteName">The siteName used to identify the handler.</param>
/// <param name="defaultLanguage">Default language for GraphQl requests.</param>
/// <param name="defaultLanguage">Default language for GraphQL requests.</param>
/// <returns>The <see cref="ILayoutRequestHandlerBuilder{THandler}"/> so that additional calls can be chained.</returns>
public static ILayoutRequestHandlerBuilder<GraphQlLayoutServiceHandler> AddGraphQlWithContextHandler(
public static ILayoutRequestHandlerBuilder<GraphQLLayoutServiceHandler> AddGraphQLWithContextHandler(
this ISitecoreLayoutClientBuilder builder,
string name,
string contextId,
Expand Down Expand Up @@ -343,10 +343,10 @@ public static ILayoutRequestHandlerBuilder<GraphQlLayoutServiceHandler> AddGraph
}
});
return builder.AddHandler(name, sp
=> ActivatorUtilities.CreateInstance<GraphQlLayoutServiceHandler>(
=> ActivatorUtilities.CreateInstance<GraphQLLayoutServiceHandler>(
sp,
sp.GetRequiredKeyedService<IGraphQLClient>(name),
sp.GetRequiredService<ISitecoreLayoutSerializer>(),
sp.GetRequiredService<ILogger<GraphQlLayoutServiceHandler>>()));
sp.GetRequiredService<ILogger<GraphQLLayoutServiceHandler>>()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ namespace Sitecore.AspNetCore.SDK.LayoutService.Client.Request.Handlers.GraphQL;

/// <inheritdoc cref="ILayoutRequestHandler" />
/// <summary>
/// Initializes a new instance of the <see cref="GraphQlLayoutServiceHandler"/> class.
/// Initializes a new instance of the <see cref="GraphQLLayoutServiceHandler"/> class.
/// </summary>
/// <param name="logger">The <see cref="ILogger"/> to use for logging.</param>
/// <param name="client">The graphQl client to handle response data.</param>
/// <param name="serializer">The serializer to handle response data.</param>
public class GraphQlLayoutServiceHandler(
public class GraphQLLayoutServiceHandler(
IGraphQLClient client,
ISitecoreLayoutSerializer serializer,
ILogger<GraphQlLayoutServiceHandler> logger)
ILogger<GraphQLLayoutServiceHandler> logger)
: ILayoutRequestHandler
{
private readonly ISitecoreLayoutSerializer _serializer = serializer ?? throw new ArgumentNullException(nameof(serializer));
private readonly ILogger<GraphQlLayoutServiceHandler> _logger = logger ?? throw new ArgumentNullException(nameof(logger));
private readonly ILogger<GraphQLLayoutServiceHandler> _logger = logger ?? throw new ArgumentNullException(nameof(logger));
private readonly IGraphQLClient _client = client ?? throw new ArgumentNullException(nameof(client));

/// <inheritdoc />
Expand Down Expand Up @@ -87,7 +87,7 @@ query LayoutQuery($path: String!, $language: String!, $site: String!) {
if (response.Errors != null)
{
errors.AddRange(
response.Errors.Select(e => new SitecoreLayoutServiceClientException(new LayoutServiceGraphQlException(e))));
response.Errors.Select(e => new SitecoreLayoutServiceClientException(new LayoutServiceGraphQLException(e))));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ namespace Sitecore.AspNetCore.SDK.LayoutService.Client.Request.Handlers.GraphQL;

/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="LayoutServiceGraphQlException"/> class.
/// Initializes a new instance of the <see cref="LayoutServiceGraphQLException"/> class.
/// </summary>
/// <param name="error">GraphQL Error of a GraphQL Query.</param>
public class LayoutServiceGraphQlException(GraphQLError error)
public class LayoutServiceGraphQLException(GraphQLError error)
: SitecoreLayoutServiceClientException(error.Message)
{
/// <summary>
/// Gets GraphQL Error of a GraphQL Query.
/// </summary>
public GraphQLError GraphQlError { get; } = error ?? throw new ArgumentNullException(nameof(error));
public GraphQLError GraphQLError { get; } = error ?? throw new ArgumentNullException(nameof(error));
}
Loading
Loading