graphql-workshop
graphql-workshop copied to clipboard
[ScopedService] is Obsolete, but using [Service(ServiceKind.Pooled)] fails
As per GraphQL-Workshop and Session #3 Understanding GraphQL query execution and DataLoader
I followed Steps 3, 4, 5, 6 & 7 and everything worked as expected. But Warning is shown while using [ScopedService] that it is Obsolete and I should use [Service(ServiceKind.Pooled)] or [Service(ServiceKind.Resolver)]. But when I use either [Service(ServiceKind.Pooled)] or [Service(ServiceKind.Resolver)] then getting error as following.
"No service for type 'Microsoft.Extensions.ObjectPool.ObjectPool`1[ApplicationDbContext]' has been registered."