code: function copyBaseTCFieldsToChildTC(
    baseDTC: ObjectTypeComposer<any, any>,
    childTC: ObjectTypeComposer<any, any>
  ) {
    const baseFields = baseDTC.getFieldNames();
    const childFields = childTC.getFieldNames();
  
    for (const field of baseFields) {
      const isFieldExists = childFields.find(fld => fld === field);
  
      if (isFieldExists) {
        childTC.extendField(field, {
          type: baseDTC.getField(field).type,
        });
      } else {
        childTC.setField(field, baseDTC.getField(field));
      }
    }
  
    return childTC;
  }
docs: copy all baseTypeComposer fields to childTC these are the fields before calling discriminator