query FindRootFoldersForSelect($zip_file_filter: MultiCriterionInput) {
  findFolders(
    filter: { per_page: -1, sort: "path", direction: ASC }
    folder_filter: {
      parent_folder: { modifier: IS_NULL }
      zip_file: $zip_file_filter
    }
  ) {
    count
    folders {
      ...SelectFolderData
    }
  }
}

query FindFoldersForQuery(
  $filter: FindFilterType
  $folder_filter: FolderFilterType
  $ids: [ID!]
) {
  findFolders(filter: $filter, folder_filter: $folder_filter, ids: $ids) {
    count
    folders {
      ...RecursiveFolderData
    }
  }
}

query FindFolderHierarchyForIDs($ids: [ID!]!) {
  findFolders(ids: $ids) {
    count
    folders {
      ...SelectFolderData

      parent_folders {
        ...SelectFolderData
        # the parent folders will be expanded, so we need the child folders
        sub_folders {
          ...SelectFolderData
          # get zip file so we can filter out zip folders if needed
          zip_file {
            id
          }
        }
      }
    }
  }
}
