PlainApp
API 참조

공유

기능 지원은 app.capabilities, 인가는 app.access와 호스트 권한으로 확인하세요. 예제는 합성 값을 사용합니다. 호출 전에 경로, ID, 입력, 필터를 바꾸세요.

타입 정의

graphql
type Mutation {
  createShare(input: ShareInput!): Share!
  deleteShare(id: ID!): Boolean!
  updateShare(id: ID!, input: ShareInput!): Share!
}

type Query {
  share(id: ID!): Share
  shares: [Share!]!
}

scalar Instant

type Share {
	id: ID!
	name: String!
	password: String!
	expiresAt: Instant
	readOnly: Boolean!
	data: [SharePath!]!
	url: String!
}

input ShareInput {
	name: String!
	password: String!
	expiresAt: Instant
	readOnly: Boolean!
	data: [SharePathInput!]!
}

type SharePath {
	virtualPath: String!
	realPath: String!
	isDir: Boolean!
}

input SharePathInput {
	virtualPath: String!
	realPath: String!
	isDir: Boolean!
}

작업

mutation

createShare

선택한 경로, 읽기 전용 정책, 선택적 만료 시각으로 공유를 만듭니다.

graphql
mutation createShare($input: ShareInput!) {
  createShare(input: $input) { id name password expiresAt readOnly url }
}
mutation

deleteShare

공유를 삭제하고 이를 통한 접근을 취소합니다.

graphql
mutation deleteShare($id: ID!) {
  deleteShare(id: $id)
}
mutation

updateShare

공유의 이름, 만료 시각, 선택한 파일 시스템 루트를 갱신합니다.

graphql
mutation updateShare($id: ID!, $input: ShareInput!) {
  updateShare(id: $id, input: $input) { id name password expiresAt readOnly url }
}
query

share

형식이 지정된 경로 매핑과 사용 가능한 URL을 포함한 공유 하나를 읽습니다. 없으면 null을 반환합니다.

graphql
query share($id: ID!) {
  share(id: $id) { id name password expiresAt readOnly url }
}
query

shares

편집 가능한 만료된 공유를 포함해 저장된 공유를 나열합니다.

graphql
query shares {
  shares { id name password expiresAt readOnly url }
}