I'm not sure if this is a Prisma specific thing or...
# orm-help
h
I'm not sure if this is a Prisma specific thing or not, But I am trying to get this Query to sort the
ideas
of `users`:
Copy code
query users {
  users {
    id
    ideas(orderBy: createdAt_DESC) {
      id
    }
  }
}
It works without the
orderBy
argument. However with the
orderBy
arg, I get this error:
"Unknown argument \"orderBy\" on field \"ideas\" of type \"User\"."
My
ideas
schema is here: https://github.com/hmmChase/next-graphql-starter/blob/master/backend/src/schema/schema.graphql#L29 My
ideas
resolver is here: https://github.com/hmmChase/next-graphql-starter/blob/master/backend/src/resolvers/ideaResolver.js#L16 Btw, if I Query
ideas
with the
orderBy
directly:
Copy code
query ideas {
  ideas(orderBy: createdAt_DESC) {
    id
  }
}
It works. I am just confused how to make the nested field sorting work.