Skip to content

mostafarastgar/kotlin-quarkus-sample

Repository files navigation

Quarkus Project

Project Tech Stack

  • quarkus
  • kotlin
  • metrics
  • panache
  • mariadb
  • graphql
  • reactive
  • testcontainer
  • mockito

Prerequisite

  • Docker
    • Mardiadb container is only required for Dev environment. Following commands will create the container and configure it:
      docker run --name mariadb -e MYSQL_ROOT_PASSWORD=123456 -p 3306:3306 -d mariadb
      
      docker exec -it mariadb /bin/sh
      
      mysql -u root -p
      # Enter your password. According run container, it should be 123456
      
      create schema school_schema;
      
      quit
      
      exit
      For Test environment we don't need to setup such container. It will be automatically setup using testcontainers library
  • Java 11+

Build

./gradlew quarkusBuild

Test

./gradlew test

Run

./gradlew quarkusDev

URLs

query{
  allStudents{
    name
    stNumber
    courses{
      name
      unit
    }
  }
}
query studentByStNumber {
  student1: studentByStNumber(studentNumber: 1) {
    name
    courses {
      name
      unit
    }
  }
  student2: studentByStNumber(studentNumber: 2) {
    name
    courses {
      name
      unit
    }
  }
}
mutation createStudent {
  createStudent(student: {name: "Tom", stNumber:4, courses: [{id: 1}, {id: 2}]}) {
    name
    courses {
      name
      unit
    }
  }
}

About

quarkus-kotlin-metrics-panache-mariadb-graphql-reactive-testcontainer-mockito

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors