"""
Address City Interface
"""
interface ICity {
    id: ID!
    name: String!
    state: ITerritorialState!
    location: GeoLocation
    createdAt: DateTime!
    updatedAt: DateTime!
}

"""
Address City Create Input
"""
input CityInput {
    """
    Name of the state to display
    """
    name: String!
    """
    ID of State to associate
    """
    state: TerritorialStateInput!
}

"""
Address City Update Input
"""
input CityUpdateInput {
    name: String
    state: TerritorialStateUpdateInput!
}

"""
Pub N Go Property Address City
"""
type City implements ICity {
    id: ID!
    name: String!
    state: State!
    location: GeoLocation
    createdAt: DateTime!
    updatedAt: DateTime!
}

type Cities {
    totalCount: Int!
    data: [City]
}

input CitiesOptions {
    criteria: AnyObject
    limit: Int
    skip: Int
    sort: Sort
}

input CitiesInput {
    countryOptions: CitiesOptions
    stateOptions: CitiesOptions
    cityOptions: CitiesOptions
}

extend type Query {
    cities(input: CitiesInput): Cities!
    city(id: ID!): City!
}

extend type Mutation {
    createCity(propertyCity: CityInput!): City!
    updateCity(id: ID!, propertyCity: CityUpdateInput!): City!
    deleteCity(id: ID!): Boolean!
}
