graphql-workshop icon indicating copy to clipboard operation
graphql-workshop copied to clipboard

[ScopedService] is Obsolete, but using [Service(ServiceKind.Pooled)] fails

Open pankaj-kansodariya opened this issue 2 years ago • 5 comments

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."

pankaj-kansodariya avatar Mar 26 '23 03:03 pankaj-kansodariya