shibi
05/23/2022, 8:34 AMtype User {
id: String
stats: Stats
}
type Stats {
id: String
}
I have User in prisma1 and prisma2. And I have stats in prisma2 only.
When I am overriding whole user query to prisma2 it works good with custom resolver to receive stats:
User {
stats: (parent, args, context) => {
return context.newPrisma.user.findUnique({
where: { id: parent.id },
}).stats();
}
}
But when I won't override user query to new prisma and will use old prisma to fetch user, it won't use stats resolver 😞
Is it possible to somehow force graphql/prisma to use prisma2 resolver inside prisma1 query?
This is only simple example, application is complex so I would like to somehow keep it consistent for now and migrate it part by part.
Thanks in advance and have a great Monday!Nurul
05/24/2022, 8:02 AM