Shotstash
API referenceGraphQL referenceMutations

Rename Folder

Renames a folder. Needs item.move.

Renames a folder. Needs item.move.

Arguments

folderId*ID!

Folder id.

name*String!

New name.

Returns

Folder!
  1. returns

A folder (section) inside a project. Folders nest.

id*ID!

Unique id.

name*String!

Folder name.

project*

The project the folder belongs to.

parent?

The parent folder, null at the top level.

children*

Live child folders.

files*

Live files directly in this folder.

totalFiles*Int!

Number of live files directly in this folder.

contentSummary*

Counts of the content by kind, including every subfolder.

repFiles*

Representative files for the folder card, from the folder and every subfolder: a sample seeded by the folder id and the calendar date, computed on the server in the Asia/Jakarta time zone (fixed in the resolver, not SHOTSTASH_DEFAULT_TIMEZONE), so every request on the same day sees the same files.

Arguments

limitInt!*

How many files to return, 1 to 3 (INVALID_LIMIT otherwise); fewer when the folder has fewer files.

folderType?String

Optional folder type label, null when none.

trashedAt?DateTime

When the folder was moved to the trash, null while live.

createdAt*DateTime!

When the folder was created.

updatedAt*DateTime!

When the folder was last changed.

mutation RenameFolder($folderId: ID!, $name: String!) {  renameFolder(folderId: $folderId, name: $name) {    id    name    project {      id      title      description      coverImage      status      files {        id        filename        originalName        mimeType        size        md5Checksum        thumbnailUrl        duplicateOf      }      folders {        id        name        totalFiles        folderType        trashedAt        createdAt        updatedAt      }      totalFiles      totalSize      createdAt    }    parent {      id      name      project {        id        title        description        coverImage        status        totalFiles        totalSize        createdAt      }      parent {        id        name        totalFiles        folderType        trashedAt        createdAt        updatedAt      }      totalFiles      folderType      trashedAt      createdAt      updatedAt    }    totalFiles    folderType    trashedAt    createdAt    updatedAt  }}