interface ICountry {
    id: ID!
    name: String!
    phone_code: String!
    currency: String
    currency_symbol: String
    emoji: String
    location: GeoLocation
    createdAt: DateTime!
    updatedAt: DateTime!
}

type Country implements ICountry {
    id: ID!
    name: String!
    phone_code: String!
    currency: String
    currency_symbol: String
    emoji: String
    location: GeoLocation
    states(criteria: AnyObject, limit: Int, skip: Int, sort: Sort): States
    createdAt: DateTime!
    updatedAt: DateTime!
}

input CountryInput {
    name: String!
}

type Countries {
    totalCount: Int!
    data: [Country]
}

extend type Query {
    countries(criteria: AnyObject, limit: Int, skip: Int, sort: Sort): Countries!
    country(id: ID!): Country!
    countryByName(name: String!): Country!
}

extend type Mutation {
    createCountry(country: CountryInput!): Country!
    updateCountry(id: ID!, country: CountryInput!): Country!
    deleteCountry(id: ID!): Boolean!
}
