我正在尝试通过与用户关联的列表来过滤列表数组,而我是在服务器端还是在客户端都感到困惑。本质上,我有一个listings()查询,它获取所有[Listings]的数组!我要过滤的内容,以便登录的用户只能看到他们创建的列表。
type User {
id: ID! @id
name: String!
email: String! @unique
password: String!
resetToken: String
resetTokenExpiry: String
permissions: [Permission] @scalarList(strategy: RELATION)
}
type Listing {
id: ID! @id
address: String!
description: String!
rooms: Int!
bath: Int!
lotSize: Int!
houseSize: Int!
price: Int!
user: User!
}