Files
twenty/packages/twenty-server/test/integration/constants/page-layout-gql-fields.constants.ts
T
nitin 44f97058ac Tidy up validation for configuration (#14939)
closes https://github.com/twentyhq/core-team-issues/issues/1605

TODO:  
~~- add stories~~
~~- add base graph on companies when creating a new graph widget~~
2025-10-09 20:34:51 +00:00

107 lines
1.7 KiB
TypeScript

export const PAGE_LAYOUT_GQL_FIELDS = `
id
name
type
objectMetadataId
createdAt
updatedAt
deletedAt
`;
export const PAGE_LAYOUT_TAB_GQL_FIELDS = `
id
title
position
pageLayoutId
createdAt
updatedAt
deletedAt
`;
export const PAGE_LAYOUT_WIDGET_CONFIGURATION_FIELDS = `
... on IframeConfiguration {
url
}
... on BarChartConfiguration {
graphType
aggregateFieldMetadataId
aggregateOperation
groupByFieldMetadataIdX
orderByX
groupByFieldMetadataIdY
orderByY
omitNullValues
axisNameDisplay
displayDataLabel
rangeMin
rangeMax
filter
color
description
}
... on LineChartConfiguration {
graphType
aggregateFieldMetadataId
aggregateOperation
groupByFieldMetadataIdX
orderByX
groupByFieldMetadataIdY
orderByY
omitNullValues
axisNameDisplay
displayDataLabel
rangeMin
rangeMax
filter
color
description
}
... on PieChartConfiguration {
graphType
groupByFieldMetadataId
aggregateFieldMetadataId
aggregateOperation
orderBy
displayDataLabel
filter
color
description
}
... on NumberChartConfiguration {
graphType
aggregateFieldMetadataId
aggregateOperation
description
filter
format
label
}
... on GaugeChartConfiguration {
graphType
aggregateFieldMetadataId
aggregateOperation
description
filter
}
`;
export const PAGE_LAYOUT_WIDGET_GQL_FIELDS = `
id
title
type
pageLayoutTabId
objectMetadataId
gridPosition {
row
column
rowSpan
columnSpan
}
configuration {
${PAGE_LAYOUT_WIDGET_CONFIGURATION_FIELDS}
}
createdAt
updatedAt
deletedAt
`;