Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public virtual async Task<ChildCategoriesQueryResponse> Handle(ChildCategoriesQu
level--;
}

result.ChildCategories = root.ChildCategories ?? new List<ExpCategory>();
result.ChildCategories = root.ChildCategories;

// try resolve products via facets
if (!string.IsNullOrEmpty(request.ProductFilter))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ namespace VirtoCommerce.XDigitalCatalog.Queries;

public class ChildCategoriesQueryResponse
{
public IList<ExpCategory> ChildCategories { get; set; }
public IList<ExpCategory> ChildCategories { get; set; } = new List<ExpCategory>();
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class ChildCategoriesQueryResponseType : ExtendableGraphType<ChildCategor
{
public ChildCategoriesQueryResponseType()
{
Field<ListGraphType<CategoryType>>(
Field<NonNullGraphType<ListGraphType<NonNullGraphType<CategoryType>>>>(
nameof(ChildCategoriesQueryResponse.ChildCategories),
resolve: context => context.Source.ChildCategories);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class ProductSuggestionsQueryResponseType : ExtendableGraphType<ProductSu
{
public ProductSuggestionsQueryResponseType()
{
Field<ListGraphType<StringGraphType>>(
Field<NonNullGraphType<ListGraphType<NonNullGraphType<StringGraphType>>>>(
nameof(ProductSuggestionsQueryResponse.Suggestions),
resolve: context => context.Source.Suggestions);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ public void Build(ISchema schema)
/// }
/// }
/// </example>
var validateCouponField = FieldBuilder.Create<CartAggregate, bool>(typeof(BooleanGraphType))
var validateCouponField = FieldBuilder.Create<CartAggregate, bool>(typeof(NonNullGraphType<BooleanGraphType>))
.Name("validateCoupon")
.Argument(GraphTypeExtenstionHelper.GetActualComplexType<NonNullGraphType<InputValidateCouponType>>(), _commandName)
.ResolveSynchronizedAsync(CartPrefix, "userId", _distributedLockService, async context =>
Expand Down