## Context
The recent addition of object renaming introduced issues with enum
names. Enum names should follow the pattern
`${schemaName}.${tableName}_${columnName}_enum`. To address this, and to
allow users to customize the API name (which is included in the enum
name, columnName), this PR implements behavior similar to object
renaming by introducing a `isLabelSyncedWithName` boolean.
<img width="624" alt="Screenshot 2024-12-02 at 11 58 49"
src="https://github.com/user-attachments/assets/690fb71c-83f0-4922-80c0-946c92dacc30">
<img width="596" alt="Screenshot 2024-12-02 at 11 58 39"
src="https://github.com/user-attachments/assets/af9a0037-7cf5-40c3-9ed5-d51b340c8087">
115 lines
2.7 KiB
TypeScript
115 lines
2.7 KiB
TypeScript
import { gql } from '@apollo/client';
|
|
|
|
export const FIND_MANY_OBJECT_METADATA_ITEMS = gql`
|
|
query ObjectMetadataItems(
|
|
$objectFilter: objectFilter
|
|
$fieldFilter: fieldFilter
|
|
) {
|
|
objects(paging: { first: 1000 }, filter: $objectFilter) {
|
|
edges {
|
|
node {
|
|
id
|
|
dataSourceId
|
|
nameSingular
|
|
namePlural
|
|
labelSingular
|
|
labelPlural
|
|
description
|
|
icon
|
|
isCustom
|
|
isRemote
|
|
isActive
|
|
isSystem
|
|
createdAt
|
|
updatedAt
|
|
labelIdentifierFieldMetadataId
|
|
imageIdentifierFieldMetadataId
|
|
shortcut
|
|
isLabelSyncedWithName
|
|
indexMetadatas(paging: { first: 100 }) {
|
|
edges {
|
|
node {
|
|
id
|
|
createdAt
|
|
updatedAt
|
|
name
|
|
indexWhereClause
|
|
indexType
|
|
isUnique
|
|
indexFieldMetadatas(paging: { first: 100 }) {
|
|
edges {
|
|
node {
|
|
id
|
|
createdAt
|
|
updatedAt
|
|
order
|
|
fieldMetadataId
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fields(paging: { first: 1000 }, filter: $fieldFilter) {
|
|
edges {
|
|
node {
|
|
id
|
|
type
|
|
name
|
|
label
|
|
description
|
|
icon
|
|
isCustom
|
|
isActive
|
|
isSystem
|
|
isNullable
|
|
isUnique
|
|
createdAt
|
|
updatedAt
|
|
defaultValue
|
|
options
|
|
settings
|
|
isLabelSyncedWithName
|
|
relationDefinition {
|
|
relationId
|
|
direction
|
|
sourceObjectMetadata {
|
|
id
|
|
nameSingular
|
|
namePlural
|
|
}
|
|
sourceFieldMetadata {
|
|
id
|
|
name
|
|
}
|
|
targetObjectMetadata {
|
|
id
|
|
nameSingular
|
|
namePlural
|
|
}
|
|
targetFieldMetadata {
|
|
id
|
|
name
|
|
}
|
|
}
|
|
}
|
|
}
|
|
pageInfo {
|
|
hasNextPage
|
|
hasPreviousPage
|
|
startCursor
|
|
endCursor
|
|
}
|
|
}
|
|
}
|
|
}
|
|
pageInfo {
|
|
hasNextPage
|
|
hasPreviousPage
|
|
startCursor
|
|
endCursor
|
|
}
|
|
}
|
|
}
|
|
`;
|