type Query {
    collections(options: CollectionListOptions): CollectionList!
    "Get a Collection either by id or slug. If neither id nor slug is speicified, an error will result."
    collection(id: ID, slug: String): Collection
    collectionFilters: [ConfigurableOperationDefinition!]!
}

type Mutation {
    "Create a new Collection"
    createCollection(input: CreateCollectionInput!): Collection!

    "Update an existing Collection"
    updateCollection(input: UpdateCollectionInput!): Collection!

    "Delete a Collection and all of its descendants"
    deleteCollection(id: ID!): DeletionResponse!

    "Move a Collection to a different parent or index"
    moveCollection(input: MoveCollectionInput!): Collection!
}

type Collection implements Node {
    isPrivate: Boolean!
}

# generated by generateListOptions function
input CollectionListOptions

input MoveCollectionInput {
    collectionId: ID!
    parentId: ID!
    index: Int!
}

input CreateCollectionTranslationInput {
    languageCode: LanguageCode!
    name: String!
    slug: String!
    description: String!
}

input UpdateCollectionTranslationInput {
    id: ID
    languageCode: LanguageCode!
    name: String
    slug: String
    description: String
}

input CreateCollectionInput {
    isPrivate: Boolean
    featuredAssetId: ID
    assetIds: [ID!]
    parentId: ID
    filters: [ConfigurableOperationInput!]!
    translations: [CreateCollectionTranslationInput!]!
}

input UpdateCollectionInput {
    id: ID!
    isPrivate: Boolean
    featuredAssetId: ID
    parentId: ID
    assetIds: [ID!]
    filters: [ConfigurableOperationInput!]
    translations: [UpdateCollectionTranslationInput!]
}
