Resolver `getPosts(_parent_, _args_, _ctx_, _info_...
# orm-help
n
Resolver
getPosts(_parent_, _args_, _ctx_, _info_){
return ctx.db.query.posts({}, info)
}
Data Model
type Post {
id: ID! @id
isPublished: Boolean! @default(_value_: false)
title: String!
text: String!
connections: [Connection!]! @relation(_name_: "ClientConnect")
}
type Link {
id: ID! @id
text: String!
url: String!
}
type Connection {
id: ID! @unique @id
client: Link @relation(_name_: "LinkConnect")
}
Schema
type Query {
getLinks(_filter_: String, _skip_: Int, _first_: Int, _orderBy_: LinkOrderByInput): [Link!]!
}
When I try to query this in the playground, on the
Connection
object, it references sort for that object. How can I refer it to the
Link
so that I may order on text or url
Seems sorting in this fashion is not possible with relations according to the docs which is unfortunate. What are some alternatives?