type Query {
    stockLocation(id: ID!): StockLocation
    stockLocations(options: StockLocationListOptions): StockLocationList!
}

type Mutation {
    createStockLocation(input: CreateStockLocationInput!): StockLocation!
    updateStockLocation(input: UpdateStockLocationInput!): StockLocation!
    deleteStockLocation(input: DeleteStockLocationInput!): DeletionResponse!
    deleteStockLocations(input: [DeleteStockLocationInput!]!): [DeletionResponse!]!

    "Assigns StockLocations to the specified Channel"
    assignStockLocationsToChannel(input: AssignStockLocationsToChannelInput!): [StockLocation!]!

    "Removes StockLocations from the specified Channel"
    removeStockLocationsFromChannel(input: RemoveStockLocationsFromChannelInput!): [StockLocation!]!
}

# Generated at runtime
input StockLocationListOptions

type StockLocationList implements PaginatedList {
    items: [StockLocation!]!
    totalItems: Int!
}

input CreateStockLocationInput {
    name: String!
    description: String
}

input UpdateStockLocationInput {
    id: ID!
    name: String
    description: String
}

input DeleteStockLocationInput {
    id: ID!
    transferToLocationId: ID
}

input AssignStockLocationsToChannelInput {
    stockLocationIds: [ID!]!
    channelId: ID!
}

input RemoveStockLocationsFromChannelInput {
    stockLocationIds: [ID!]!
    channelId: ID!
}
