feat: drop target column map (#4670)
This PR is dropping the column `targetColumnMap` of fieldMetadata entities. The goal of this column was to properly map field to their respecting column in the table. We decide to drop it and instead compute the column name on the fly when we need it, as it's more easier to support. Some parts of the code has been refactored to try making implementation of composite type more easier to understand and maintain. Fix #3760 --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
-3
@@ -57,7 +57,6 @@ export class TypeMapperService {
|
||||
const numberScalar =
|
||||
numberScalarMode === 'float' ? GraphQLFloat : GraphQLInt;
|
||||
|
||||
// LINK and CURRENCY are handled in the factories because they are objects
|
||||
const typeScalarMapping = new Map<FieldMetadataType, GraphQLScalarType>([
|
||||
[FieldMetadataType.UUID, GraphQLID],
|
||||
[FieldMetadataType.TEXT, GraphQLString],
|
||||
@@ -86,7 +85,6 @@ export class TypeMapperService {
|
||||
const numberScalar =
|
||||
numberScalarMode === 'float' ? FloatFilterType : IntFilterType;
|
||||
|
||||
// LINK and CURRENCY are handled in the factories because they are objects
|
||||
const typeFilterMapping = new Map<
|
||||
FieldMetadataType,
|
||||
GraphQLInputObjectType | GraphQLScalarType
|
||||
@@ -111,7 +109,6 @@ export class TypeMapperService {
|
||||
mapToOrderByType(
|
||||
fieldMetadataType: FieldMetadataType,
|
||||
): GraphQLInputType | undefined {
|
||||
// LINK and CURRENCY are handled in the factories because they are objects
|
||||
const typeOrderByMapping = new Map<FieldMetadataType, GraphQLEnumType>([
|
||||
[FieldMetadataType.UUID, OrderByDirectionType],
|
||||
[FieldMetadataType.TEXT, OrderByDirectionType],
|
||||
|
||||
Reference in New Issue
Block a user