Fix missing cursor on rest api (#5841)
## Before  ## After   
This commit is contained in:
@ -41,6 +41,7 @@ export class FindManyQueryFactory {
|
||||
startCursor
|
||||
endCursor
|
||||
}
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@ -11,6 +11,12 @@ export const cleanGraphQLResponse = (input: any) => {
|
||||
output[key] = input[key].edges.map((edge) =>
|
||||
cleanGraphQLResponse(edge.node),
|
||||
);
|
||||
if (input[key].pageInfo) {
|
||||
output['pageInfo'] = input[key].pageInfo;
|
||||
}
|
||||
if (input[key].totalCount) {
|
||||
output['totalCount'] = input[key].totalCount;
|
||||
}
|
||||
} else if (isObject(input[key])) {
|
||||
output[key] = cleanGraphQLResponse(input[key]);
|
||||
} else if (key !== '__typename') {
|
||||
|
||||
Reference in New Issue
Block a user