diff --git a/Directory.Build.props b/Directory.Build.props index 9223f27..754cdf2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ - 3.806.0 + 3.900.0 $(VersionSuffix)-$(BuildNumber) diff --git a/src/VirtoCommerce.WhiteLabeling.ExperienceApi/Schemas/WhiteLabelingSettingsType.cs b/src/VirtoCommerce.WhiteLabeling.ExperienceApi/Schemas/WhiteLabelingSettingsType.cs index 258c0c2..001513d 100644 --- a/src/VirtoCommerce.WhiteLabeling.ExperienceApi/Schemas/WhiteLabelingSettingsType.cs +++ b/src/VirtoCommerce.WhiteLabeling.ExperienceApi/Schemas/WhiteLabelingSettingsType.cs @@ -1,10 +1,11 @@ using GraphQL.Types; using VirtoCommerce.WhiteLabeling.ExperienceApi.Models; +using VirtoCommerce.Xapi.Core.Schemas; using VirtoCommerce.XCMS.Core.Schemas; namespace VirtoCommerce.WhiteLabeling.ExperienceApi.Schemas { - public class WhiteLabelingSettingsType : ObjectGraphType + public class WhiteLabelingSettingsType : ExtendableGraphType { public WhiteLabelingSettingsType() { @@ -15,8 +16,8 @@ public WhiteLabelingSettingsType() Field(x => x.LabelingSetting.SecondaryLogoUrl, nullable: true).Description("Logo URL for footer"); Field(x => x.LabelingSetting.FaviconUrl, nullable: true).Description("Master favicon URL"); Field(x => x.LabelingSetting.ThemePresetName, nullable: true).Description("Theme preset name"); - Field>("footerLinks", resolve: context => context.Source.FooterLinks); - Field>("favicons", resolve: context => context.Source.Favicons); + Field>("footerLinks").Resolve(context => context.Source.FooterLinks); + Field>("favicons").Resolve(context => context.Source.Favicons); } } } diff --git a/src/VirtoCommerce.WhiteLabeling.ExperienceApi/VirtoCommerce.WhiteLabeling.ExperienceApi.csproj b/src/VirtoCommerce.WhiteLabeling.ExperienceApi/VirtoCommerce.WhiteLabeling.ExperienceApi.csproj index f8d96fb..103da39 100644 --- a/src/VirtoCommerce.WhiteLabeling.ExperienceApi/VirtoCommerce.WhiteLabeling.ExperienceApi.csproj +++ b/src/VirtoCommerce.WhiteLabeling.ExperienceApi/VirtoCommerce.WhiteLabeling.ExperienceApi.csproj @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/src/VirtoCommerce.WhiteLabeling.Web/Module.cs b/src/VirtoCommerce.WhiteLabeling.Web/Module.cs index fb273ab..cadf64e 100644 --- a/src/VirtoCommerce.WhiteLabeling.Web/Module.cs +++ b/src/VirtoCommerce.WhiteLabeling.Web/Module.cs @@ -1,6 +1,6 @@ using System; -using GraphQL.Server; -using MediatR; +using GraphQL; +using GraphQL.MicrosoftDI; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Builder; using Microsoft.EntityFrameworkCore; @@ -21,7 +21,6 @@ using VirtoCommerce.WhiteLabeling.ExperienceApi; using VirtoCommerce.WhiteLabeling.ExperienceApi.Authorization; using VirtoCommerce.Xapi.Core.Extensions; -using VirtoCommerce.Xapi.Core.Infrastructure; namespace VirtoCommerce.WhiteLabeling.Web; @@ -32,12 +31,10 @@ public class Module : IModule, IHasConfiguration public void Initialize(IServiceCollection serviceCollection) { - var assemblyMarker = typeof(AssemblyMarker); - var graphQlBuilder = new CustomGraphQLBuilder(serviceCollection); - graphQlBuilder.AddGraphTypes(assemblyMarker); - serviceCollection.AddMediatR(assemblyMarker); - serviceCollection.AddAutoMapper(assemblyMarker); - serviceCollection.AddSchemaBuilders(assemblyMarker); + _ = new GraphQLBuilder(serviceCollection, builder => + { + builder.AddSchema(serviceCollection, typeof(AssemblyMarker)); + }); serviceCollection.AddDbContext(options => { diff --git a/src/VirtoCommerce.WhiteLabeling.Web/module.manifest b/src/VirtoCommerce.WhiteLabeling.Web/module.manifest index 0f64269..6e0ebcd 100644 --- a/src/VirtoCommerce.WhiteLabeling.Web/module.manifest +++ b/src/VirtoCommerce.WhiteLabeling.Web/module.manifest @@ -1,14 +1,14 @@ VirtoCommerce.WhiteLabeling - 3.806.0 + 3.900.0 - 3.841.0 + 3.861.0 - - - + + +