Hello, I am trying to implement offsetLimitPagination function to GetApplicationComments query. The problem comes when I have nested comments (items). Comment typename is ApplicationComment.
In this situation getApplicationComments query returns data that is an empty array.
![]()
query GetApplicationComments($offset: Int! $limit: Int!) {
getApplicationComments(offset: $offset limit: $limit) {
count
items {
id
message
}
}
}
new InMemoryCache({
typePolicies: {
ApplicationComment: { keyFields: ["id"] },
Query: {
fields: {
getApplicationComments: offsetLimitPagination(),
},
},
},
})