Describe the bug
Skip and First does not return accurate results from related sub selections. Instead of filtering the results the entire collection is returned. orderBy works fine. first, skip do not work. When filtering the type directly filtering works fine, just not with a nested query.
from datamodel.prisma
type User {
id: ID! @unique
username: String! @unique
email: String! @unique
password: String!
logs: [Log!]! @relation(name:"UserLogs", onDelete: CASCADE)
sets: [Set!]! @relation(name:"UserSets", onDelete: CASCADE)
}
type Log {
id: ID! @unique
created_at: DateTime!
sets: [Set!]! @relation(name: "SetsOnLog", onDelete: CASCADE)
user: User! @relation(name:"UserLogs", onDelete: SET_NULL)
}
type Set {
id: ID! @unique
created_at: DateTime!
movement: Movement!
reps: Int!
weight: Float!
unit: String!
user: User! @relation(name:"UserSets", onDelete: SET_NULL)
log: Log! @relation(name: "SetsOnLog", onDelete: SET_NULL)
}
Expected behavior
(first: 1, skip:0) should return the first log on user not all logs on user...
Screenshots
If applicable, add screenshots to help explain your problem.


Versions (please complete the following information):
prisma CLI: prisma/1.17.0-beta.16 (darwin-x64) node-v9.3.0Additional context
I believe this to be a bug but perhaps I've missed something?
Things are seeming very inconsistent in general... not quite entirely broken. But I'm very confused...
Anotha One.

This one has 4 entries... and shows three when asked for one.
Thanks for filing this bug and providing a reproduction. It seems to only affect Postgres and a fix should be coming out soon.
I think this is the same as #3097
Oh good! Thanks! I thought I was losing my mind for a second :)
We just released 1.16.4 which should fix this issue.
Most helpful comment
Thanks for filing this bug and providing a reproduction. It seems to only affect Postgres and a fix should be coming out soon.