Skip to content

Commit

Permalink
changing file resolvers and user resolvers for new file model
Browse files Browse the repository at this point in the history
  • Loading branch information
sou-chon committed Jun 7, 2020
1 parent a2a3d94 commit a6fd55b
Show file tree
Hide file tree
Showing 18 changed files with 284 additions and 299 deletions.
161 changes: 25 additions & 136 deletions packages/itmat-commons/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/itmat-commons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"graphql": "15.0.0",
"graphql-tag": "2.10.3",
"itmat-utils": "1.1.8",
"mongodb": "3.5.5"
"uuid": "8.1.0"
},
"devDependencies": {
"@types/mongodb": "3.5.20",
Expand Down
26 changes: 26 additions & 0 deletions packages/itmat-commons/src/graphql/files.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
import gql from 'graphql-tag';

export const CREATE_FILE = gql`
mutation createFile(
$fileName: String!,
$fileType: FileType,
$studyId: String
) {
createFile(
fileName: $fileName,
fileType: $fileType,
studyId: $studyId
) {
id
fileName
studyId
projectId
fileType
fileSize
description
uploadedBy
userId
patientId
# childFiles
}
}
`;

export const UPLOAD_FILE = gql`
mutation uploadFile($studyId: String!, $file: Upload!, $description: String!, $fileLength: Int) {
uploadFile(studyId: $studyId, description: $description, file: $file, fileLength: $fileLength) {
Expand Down
22 changes: 11 additions & 11 deletions packages/itmat-commons/src/graphql/study.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ export const GET_STUDY = gql`
}
}
files {
id: String!
fileName: String!
studyId: String
projectId: String
fileType: FileType!
fileSize: Int
description: String
uploadedBy: String!
userId: String
patientId: String
childFiles: [File]
id
fileName
studyId
projectId
fileType
fileSize
description
uploadedBy
userId
patientId
childFiles
}
numOfSubjects
currentDataVersion
Expand Down
50 changes: 39 additions & 11 deletions packages/itmat-interface/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a6fd55b

Please sign in to comment.