Files v2 - FILES field update/create in common API (#17400)
## FILES Field update interface
```
mutation {
updateCompany(
id: "company-uuid"
data: {
filesfield: [
{ fileId: "new-file-uuid", label: "new-document.pdf" }
]
}
) {
id
filesfield {
fileId
label
extension
}
}
}
```
This commit is contained in:
+8
@@ -234,6 +234,12 @@ describe('WorkspaceEntityManager', () => {
|
||||
emitDatabaseBatchEvent: jest.fn(),
|
||||
emitCustomBatchEvent: jest.fn(),
|
||||
} as any,
|
||||
coreDataSource: {
|
||||
getRepository: jest.fn(() => ({
|
||||
find: jest.fn(),
|
||||
softDelete: jest.fn(),
|
||||
})),
|
||||
} as any,
|
||||
} as WorkspaceInternalContext;
|
||||
|
||||
mockDataSource = {
|
||||
@@ -250,6 +256,7 @@ describe('WorkspaceEntityManager', () => {
|
||||
},
|
||||
permissionsPerRoleId: {},
|
||||
eventEmitterService: mockInternalContext.eventEmitterService,
|
||||
coreDataSource: mockInternalContext.coreDataSource,
|
||||
} as GlobalWorkspaceDataSource;
|
||||
|
||||
mockPermissionOptions = {
|
||||
@@ -305,6 +312,7 @@ describe('WorkspaceEntityManager', () => {
|
||||
findColumnWithPropertyPath: jest.fn(),
|
||||
}),
|
||||
eventEmitterService: mockInternalContext.eventEmitterService,
|
||||
coreDataSource: mockInternalContext.coreDataSource,
|
||||
createQueryBuilder: jest.fn().mockReturnValue({
|
||||
delete: jest.fn().mockReturnThis(),
|
||||
from: jest.fn().mockReturnThis(),
|
||||
|
||||
Reference in New Issue
Block a user