[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
This commit is contained in:
@@ -9,5 +9,8 @@ export const VIEW_FIELD_FRAGMENT = gql`
|
||||
position
|
||||
size
|
||||
aggregateOperation
|
||||
createdAt
|
||||
updatedAt
|
||||
deletedAt
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
import { VIEW_FIELD_FRAGMENT } from '@/views/graphql/fragments/viewFieldFragment';
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DELETE_CORE_VIEW_FIELD = gql`
|
||||
mutation DeleteCoreViewField($id: String!) {
|
||||
deleteCoreViewField(id: $id)
|
||||
${VIEW_FIELD_FRAGMENT}
|
||||
mutation DeleteCoreViewField($input: DeleteViewFieldInput!) {
|
||||
deleteCoreViewField(input: $input) {
|
||||
...ViewFieldFragment
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
import { VIEW_FIELD_FRAGMENT } from '@/views/graphql/fragments/viewFieldFragment';
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DESTROY_CORE_VIEW_FIELD = gql`
|
||||
mutation DestroyCoreViewField($id: String!) {
|
||||
destroyCoreViewField(id: $id)
|
||||
${VIEW_FIELD_FRAGMENT}
|
||||
mutation DestroyCoreViewField($input: DestroyViewFieldInput!) {
|
||||
destroyCoreViewField(input: $input) {
|
||||
...ViewFieldFragment
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -3,8 +3,8 @@ import { gql } from '@apollo/client';
|
||||
|
||||
export const UPDATE_CORE_VIEW_FIELD = gql`
|
||||
${VIEW_FIELD_FRAGMENT}
|
||||
mutation UpdateCoreViewField($id: String!, $input: UpdateViewFieldInput!) {
|
||||
updateCoreViewField(id: $id, input: $input) {
|
||||
mutation UpdateCoreViewField($input: UpdateViewFieldInput!) {
|
||||
updateCoreViewField(input: $input) {
|
||||
...ViewFieldFragment
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user