A GraphQL APi for Bop-Consulting application.
https://bop-consulting.herokuapp.com/graphql
type CitiesModel {
city_id: Float!
city_name: String!
state_id: Float!
state_code: String!
city_nominatim: String!
state_name: String!
country_id: Float!
country_code: String!
country_name: String!
city_latitude: Float!
city_longitude: Float!
city_wikiDataId: String!
bop_wikiDataId: String!
city_population: String!
city_osm_id: Float!
city_administrative_level: Float
}
type Query {
// getAllCities query will return CitiesModel type data
getAllCities: [CitiesModel!]!
// (city: String) is used as an argument on query which then filter out city that will be provided to the query
getCity(city: String!): CitiesModel
}
You can copy and paste the following examples to query
https://bop-consulting.herokuapp.com/graphqlquery {
getAllCities {
country_name
city_name
city_latitude
city_longitude
city_population
city_id
country_id
country_code
city_osm_id
city_nominatim
city_wikiDataId
city_administrative_level
state_id
state_code
state_name
}
}
query {
getCity(city: "Seattle") {
country_name
city_name
city_latitude
city_longitude
city_population
city_id
country_id
country_code
city_osm_id
city_nominatim
city_wikiDataId
city_administrative_level
state_id
state_code
state_name
}
}
$ npm install or yarn install
# development
$ npm run start or yarn start
# watch mode
$ npm run start:dev or yarn start:dev
# production mode
$ npm run start:prod or yarn start:prod
# unit tests
$ npm run test or yarn test
# e2e tests
$ npm run test:e2e or yarn test:e3e
# test coverage
$ npm run test:cov or yarn test:cov