Sync stripe tables (#5475)

Stripe tables do not support `hasNextPage` and `totalCount`. This may be
because of stripe wrapper do not properly support `COUNT` request.
Waiting on pg_graphql answer
[here](https://github.com/supabase/pg_graphql/issues/519).

This PR:
- removes `totalCount` and `hasNextPage` form queries for remote
objects. Even if it works for postgres, this may really be inefficient
- adapt the `fetchMore` functions so it works despite `hasNextPage`
missing
- remove `totalCount` display for remotes
- fix `orderBy`

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
Thomas Trompette
2024-05-22 11:20:44 +02:00
committed by GitHub
parent 35c1f97511
commit 2e79bcc70b
22 changed files with 191 additions and 87 deletions

View File

@ -1,6 +1,7 @@
import gql from 'graphql-tag';
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
import { isAggregationEnabled } from '@/object-metadata/utils/isAggregationEnabled';
import { mapObjectMetadataToGraphQLQuery } from '@/object-metadata/utils/mapObjectMetadataToGraphQLQuery';
import { RecordGqlOperationGqlRecordFields } from '@/object-record/graphql/types/RecordGqlOperationGqlRecordFields';
import { capitalize } from '~/utils/string/capitalize';
@ -36,11 +37,11 @@ query FindMany${capitalize(
cursor
}
pageInfo {
hasNextPage
${isAggregationEnabled(objectMetadataItem) ? 'hasNextPage' : ''}
startCursor
endCursor
}
totalCount
${isAggregationEnabled(objectMetadataItem) ? 'totalCount' : ''}
}
}
`;