kibettheophilus / kenyan-counties

A simple graphql api to display Kenyan counties information:subcounties and wards

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Simple graphql api

How to setup

  • Clone the repo
 git clone https://github.com/kibettheophilus/kenyan-counties.git
  • Create a database in MongoDB with name counties and add the uri to the application.yml
  • Run the project
./gradlew bootRun 
mutation {
  addCounty(county: {
    code:"001",
    name:"Mombasa"
    constituencies: {
      name: "Jomvu",
      wards:"Shanzu South, Shanzu North"
    }
  }){
  status
    message
    details {
      code
      name
    }
  }
}
  • Fetch data using the getCounties query, below is a sample
query{
 getCounties(name:"Mombasa") {
   status
   message
   details {
     name
     code
     constituencies {
       name
       wards
     }
   }
 }
}

Technologies

Screenshots

Screenshot 2024-01-04 at 13 13 15 Screenshot 2024-01-04 at 13 13 49 Screenshot 2024-01-04 at 13 14 03

About

A simple graphql api to display Kenyan counties information:subcounties and wards


Languages

Language:Java 95.3%Language:Dockerfile 4.7%