New strategy: - add settings field on FieldMetadata. Contains a boolean isIdField and for numbers, a precision - if idField, the graphql scalar returned will be a GraphQL id. This will allow the app to work even for ids that are not uuid - remove globals dateScalar and numberScalar modes. These were not used - set limit as Integer - check manually in query runner mutations that we send a valid id Todo left: - remove WorkspaceBuildSchemaOptions since this is not used anymore. Will do in another PR --------- Co-authored-by: Thomas Trompette <thomast@twenty.com> Co-authored-by: Weiko <corentin@twenty.com>
17 lines
516 B
TypeScript
17 lines
516 B
TypeScript
import { CoreObjectNameSingular } from '@/object-metadata/types/CoreObjectNameSingular';
|
|
import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
|
|
|
|
export const isObjectMetadataAvailableForRelation = (
|
|
objectMetadataItem: Pick<
|
|
ObjectMetadataItem,
|
|
'isSystem' | 'nameSingular' | 'isRemote'
|
|
>,
|
|
) => {
|
|
return (
|
|
(!objectMetadataItem.isSystem ||
|
|
objectMetadataItem.nameSingular ===
|
|
CoreObjectNameSingular.WorkspaceMember) &&
|
|
!objectMetadataItem.isRemote
|
|
);
|
|
};
|