Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCST-2241: add scoped schema #21

Merged
merged 5 commits into from
Dec 9, 2024
Merged
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 @@ -10,7 +10,7 @@
<ItemGroup>
<PackageReference Include="FluentValidation" Version="11.10.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="VirtoCommerce.Xapi.Core" Version="3.809.0" />
<PackageReference Include="VirtoCommerce.Xapi.Core" Version="3.815.0" />
<PackageReference Include="VirtoCommerce.XCatalog.Core" Version="3.818.0" />
<PackageReference Include="VirtoCommerce.CartModule.Core" Version="3.822.0" />
<PackageReference Include="VirtoCommerce.PaymentModule.Core" Version="3.804.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using VirtoCommerce.PricingModule.Core.Model;
using VirtoCommerce.TaxModule.Core.Model;
using VirtoCommerce.Xapi.Core.Extensions;
using VirtoCommerce.Xapi.Core.Infrastructure;
using VirtoCommerce.Xapi.Core.Pipelines;
using VirtoCommerce.XCart.Core;
using VirtoCommerce.XCart.Core.Models;
Expand All @@ -24,6 +25,8 @@ public static IServiceCollection AddXCart(this IServiceCollection services, IGra
{
graphQLBuilder.AddSchema(typeof(CoreAssemblyMarker), typeof(DataAssemblyMarker));

services.AddSingleton<ScopedSchemaFactory<DataAssemblyMarker>>();

services.AddSingleton<IAuthorizationHandler, CanAccessCartAuthorizationHandler>();
services.AddTransient<ICartAggregateRepository, CartAggregateRepository>();
services.AddTransient<ICartValidationContextFactory, CartValidationContextFactory>();
Expand Down
4 changes: 3 additions & 1 deletion src/VirtoCommerce.XCart.Web/Module.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using VirtoCommerce.Platform.Core.Modularity;
using VirtoCommerce.Xapi.Core.Extensions;
using VirtoCommerce.Xapi.Core.Infrastructure;
using VirtoCommerce.XCart.Data;
using VirtoCommerce.XCart.Data.Extensions;

namespace VirtoCommerce.XCart.Web;
Expand All @@ -20,7 +22,7 @@ public void Initialize(IServiceCollection serviceCollection)

public void PostInitialize(IApplicationBuilder appBuilder)
{
// Nothing to do here
appBuilder.UseScopedSchema<DataAssemblyMarker>("cart");
}

public void Uninstall()
Expand Down
2 changes: 1 addition & 1 deletion src/VirtoCommerce.XCart.Web/module.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<dependency id="VirtoCommerce.Payment" version="3.804.0" />
<dependency id="VirtoCommerce.Pricing" version="3.809.0" />
<dependency id="VirtoCommerce.Shipping" version="3.802.0" />
<dependency id="VirtoCommerce.Xapi" version="3.809.0" />
<dependency id="VirtoCommerce.Xapi" version="3.815.0" />
<dependency id="VirtoCommerce.XCatalog" version="3.818.0" />
</dependencies>

Expand Down
Loading