martmull
2024-06-12 16:25:04 +02:00
committed by GitHub
parent ad6547948b
commit 30d3ebc68a
5 changed files with 22 additions and 2 deletions

View File

@ -41,6 +41,7 @@ export class FindManyQueryFactory {
startCursor
endCursor
}
totalCount
}
}
`;

View File

@ -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') {