I want to order a table by a nested attribute. I tried something like this:
const result = await prisma.posts.findMany({orderBy: { author: { name : 'desc' } } }) ;
console.log(results);
But I got an error:
Unknown arg ' user' in orderBy.user for type CustomerAccountOrderByInput.
When I checked the type PostOrderByInput there were only the scalar attributes of the post model available, the related models are missing.
Is it possible to extend the orderBy types to include the related models?
I detected this issue using nexus-prisma, @Weakky proposed to make it a prisma/photon issue: graphql-nexus/nexus-plugin-prisma#458
I want to order a table by a nested attribute. I tried something like this:
But I got an error:
Unknown arg ' user' in orderBy.user for type CustomerAccountOrderByInput.When I checked the type PostOrderByInput there were only the scalar attributes of the post model available, the related models are missing.
Is it possible to extend the orderBy types to include the related models?
I detected this issue using nexus-prisma, @Weakky proposed to make it a prisma/photon issue: graphql-nexus/nexus-plugin-prisma#458