Files
twenty/packages/twenty-server/test/integration/graphql/utils/find-views-operation-factory.util.ts
T
593b064448 Create resolvers and controllers for core views (#13624)
Created:
- Services
- Resolvers
- Controllers
- Tests for services
- Integration tests for GraphQL and Rest

Updated the Rest API playground

Added new feature flag `IS_CORE_VIEW_ENABLED`

Updated `viewFilter` `operand` and `view` `type` to be enums rather than
strings and generated migration file.

Closes https://github.com/twentyhq/core-team-issues/issues/1259

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2025-08-07 18:45:04 +02:00

20 lines
512 B
TypeScript

import gql from 'graphql-tag';
import { VIEW_GQL_FIELDS } from 'test/integration/constants/view-gql-fields.constants';
export const findViewsOperationFactory = ({
gqlFields = VIEW_GQL_FIELDS,
objectMetadataId,
}: {
gqlFields?: string;
objectMetadataId?: string;
} = {}) => ({
query: gql`
query GetCoreViews($objectMetadataId: String) {
getCoreViews(objectMetadataId: $objectMetadataId) {
${gqlFields}
}
}
`,
variables: objectMetadataId ? { objectMetadataId } : {},
});