Files
twenty/packages/twenty-server/test/integration/graphql/utils/delete-view-field-operation-factory.util.ts
T
Paul Rastoin c8bfbf00d7 [CoreViewField BREAKING_CHANGES] Refactor view field service v2 and resolver (#14396)
## Introduction

### Twenty-sever

Standardizing resolver input and transpilation models + return type on
destroy and delete
~~Finally~~ Did plug everything under a feature flag and add coverage
Next will do same for the view resolver and service v2

### Twenty-front
Refactored view field service in order to use codegenerated strictly
typed mutations and adapt to new api contract
2025-09-11 15:25:36 +00:00

22 lines
506 B
TypeScript

import gql from 'graphql-tag';
import { VIEW_FIELD_GQL_FIELDS } from 'test/integration/constants/view-gql-fields.constants';
export const deleteViewFieldOperationFactory = ({
viewFieldId,
gqlFields = VIEW_FIELD_GQL_FIELDS,
}: {
gqlFields?: string;
viewFieldId: string;
}) => ({
query: gql`
mutation DeleteCoreViewField($input: DeleteViewFieldInput!) {
deleteCoreViewField(input: $input) {
${gqlFields}
}
}
`,
variables: {
input: { id: viewFieldId },
},
});