apply fix on GraphQL ...

This commit is contained in:
2026-06-01 15:49:03 +03:30
parent 3adc60599c
commit b4d8484f4c
+10 -7
View File
@@ -1476,7 +1476,7 @@ namespace xDataService.Helpers
// Register Graph Type ...
source.Add(
new ServiceDescriptor(
lifetime: ServiceLifetime.Singleton,
lifetime: lifetime, // ServiceLifetime.Singleton,
serviceType: repositoryDescriptor.GraphType,
implementationType: repositoryDescriptor.GraphType
)
@@ -1486,7 +1486,7 @@ namespace xDataService.Helpers
// Register Graph Events ...
source.Add(
new ServiceDescriptor(
lifetime: ServiceLifetime.Singleton,
lifetime: lifetime, // ServiceLifetime.Singleton,
serviceType: typeof(XBaseGraphQLEventType<TEntity, TKey, TGraph>),
implementationType: typeof(XBaseGraphQLEventType<TEntity, TKey, TGraph>)
)
@@ -1516,14 +1516,14 @@ namespace xDataService.Helpers
// Register Graph Schema ...
source.Add(
new ServiceDescriptor(
lifetime: lifetime,
serviceType: repositoryDescriptor.GraphSchema,
implementationType: repositoryDescriptor.GraphSchema,
lifetime: lifetime
implementationType: repositoryDescriptor.GraphSchema
)
);
//
source.AddSingleton<IDocumentExecuter, DocumentExecuter>();
source.AddScoped<IDocumentExecuter, DocumentExecuter>();
//
// Register Graph Type Schema ...
@@ -1544,9 +1544,12 @@ namespace xDataService.Helpers
.AddNewtonsoftJson(deserializerSettings => { }, serializerSettings => { })
.AddWebSockets()
.AddDataLoader()
.AddGraphTypes();
.AddGraphTypes(lifetime);
}
builder.AddGraphTypes(repositoryDescriptor.GraphSchema);
builder.AddGraphTypes(
serviceLifetime: lifetime,
typeFromAssembly: repositoryDescriptor.GraphSchema
);
}
#endregion
}