diff --git a/packages/nocodb/src/lib/noco/gql/GqlApiBuilder.ts b/packages/nocodb/src/lib/noco/gql/GqlApiBuilder.ts index 321c8bfc4e..05d5f7def6 100644 --- a/packages/nocodb/src/lib/noco/gql/GqlApiBuilder.ts +++ b/packages/nocodb/src/lib/noco/gql/GqlApiBuilder.ts @@ -57,7 +57,11 @@ const IGNORE_TABLES = [ // Base class of GQL type class XCType { constructor(o) { - Object.assign(this, o) + for (const k in o) { + if (!this[k]) { + this[k] = o[k] + } + } } } @@ -1515,7 +1519,7 @@ export class GqlApiBuilder extends BaseApiBuilder implements XcMetaMgr { const oldSchema = this.schemas[tn]; this.log(`onTableUpdate : Populating new schema for '%s' table`, changeObj.tn); - this.schemas[tn] = GqlXcSchemaFactory.create(this.connectionConfig, this.generateRendererArgs(enabledModelCtx)).getString(); + this.schemas[tn] = GqlXcSchemaFactory.create(this.connectionConfig, this.generateRendererArgs(enabledModelCtx)).getString(); if (oldSchema !== this.schemas[tn]) { this.log(`onTableUpdate : Updating and taking backup of schema - '%s' table`, changeObj.tn); @@ -2030,7 +2034,7 @@ export class GqlApiBuilder extends BaseApiBuilder implements XcMetaMgr { schema_previous: JSON.stringify(previousSchemas) }, { title: tn, - type:'table' + type: 'table' }); }