PlainApp
API 참조

앱 첨부 파일

앱 첨부 파일의 목록과 개수를 조회하고, 업로드한 조각을 병합하고, 첨부 파일 참조를 해제합니다.

타입 정의

graphql
type Mutation {
  mergeAppFileChunks(fileId: String!, totalChunks: Int!, fileName: String!, totalSize: Long!): MergeTask!
  releaseAppFile(fileId: String!): Boolean!
}

type Query {
  appFileCount(query: String!): Int!
  appFiles(query: String!, offset: Int!, limit: Int!): [AppFile!]!
}

type AppFile {
	id: String!
	size: Long!
	mimeType: String!
	fileName: String!
	realPath: String!
	createdAt: Instant!
	updatedAt: Instant!
}

scalar Instant

scalar Long

type MergeTask {
	status: MergeTaskStatus!
	value: String
	mergedSize: Long
	error: String
}

enum MergeTaskStatus {
	NONE
	STARTED
	MERGING
	DONE
	FAILED
}

작업

mutation

mergeAppFileChunks

업로드된 청크를 앱 관리 첨부 파일로 병합하기 시작합니다. 완료 여부는 mergeStatus로 확인하세요.

graphql
mutation mergeAppFileChunks($fileId: String!, $totalChunks: Int!, $fileName: String!, $totalSize: Long!) {
  mergeAppFileChunks(fileId: $fileId, totalChunks: $totalChunks, fileName: $fileName, totalSize: $totalSize) { status value mergedSize error }
}
mutation

releaseAppFile

지정한 앱 관리 첨부 참조를 해제합니다.

graphql
mutation releaseAppFile($fileId: String!) {
  releaseAppFile(fileId: $fileId)
}
query

appFileCount

쿼리에 일치하는 앱 관리 첨부 레코드 수를 셉니다.

graphql
query appFileCount($query: String!) {
  appFileCount(query: $query)
}
query

appFiles

쿼리에 일치하는 앱 관리 첨부 레코드를 페이지 단위로 읽습니다.

graphql
query appFiles($query: String!, $offset: Int!, $limit: Int!) {
  appFiles(query: $query, offset: $offset, limit: $limit) { id size mimeType fileName realPath createdAt updatedAt }
}