Hello Guys! I started using Prisma with apollo ser...
# orm-help
l
Hello Guys! I started using Prisma with apollo server and I do not understand if to use prisma inside resolvers or inside data sources. Apparently prisma has a built in dataloader... so probably that is why I cannot find a dataSource extension like apollo-datasource-mongo or REST...
e
For Apollo Server, I normally put Prisma in the context and access it in resolvers
💯 1
d
What Eddy said
let me find the example
l
wow guys you are amazing, that was immediate!! got it!! and the reason why you use it directly in resolvers is because it has built in the features of apolllo data sources you would need, like caching and dataloader, right?
d
yes, it handles n+1 under the hood
l
Fantastic!! Thank you @Eddy Nguyen and @Dominic Hadfield
🙌 2
d
no problem, just @ me if you need anything else
l
ok thank you very much!!