c8bfbf00d7
## 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
24 lines
598 B
TypeScript
24 lines
598 B
TypeScript
import gql from 'graphql-tag';
|
|
import { VIEW_FIELD_GQL_FIELDS } from 'test/integration/constants/view-gql-fields.constants';
|
|
|
|
import { type UpdateViewFieldInput } from 'src/engine/core-modules/view/dtos/inputs/update-view-field.input';
|
|
|
|
export const updateViewFieldOperationFactory = ({
|
|
gqlFields = VIEW_FIELD_GQL_FIELDS,
|
|
input,
|
|
}: {
|
|
gqlFields?: string;
|
|
input: UpdateViewFieldInput;
|
|
}) => ({
|
|
query: gql`
|
|
mutation UpdateCoreViewField($input: UpdateViewFieldInput!) {
|
|
updateCoreViewField(input: $input) {
|
|
${gqlFields}
|
|
}
|
|
}
|
|
`,
|
|
variables: {
|
|
input,
|
|
},
|
|
});
|