Code Monkey home page Code Monkey logo

axon-graphql-starter's Introduction

axon-graphql-spl

start supporting servers

docker run -d --name some-axon-server -p 8024:8024 -p 8124:8124 axoniq/axonserver   
docker run -d -e "MYSQL_ROOT_PASSWORD=Admin12345" -e "MYSQL_USER=usr" -e "MYSQL_PASSWORD=User12345" -e "MYSQL_DATABASE=development" -e "MYSQL_AUTHENTICATION_PLUGIN=mysql_native_password" -p 3306:3306 --name some-mysql bitnami/mysql:8.0.19

stop supporting servers

docker stop some-axon-server; docker rm some-axon-server
docker stop some-mysql; docker rm some-mysql

Testing

Command

curl -X POST 'http://localhost:8080/hospital' -H 'Content-Type: application/json' \
  -d '{ "hospCode": "VH" }'

curl -X POST 'http://localhost:8080/hospital/VH' -H 'Content-Type: application/json' \
  -d '{ "wardCode": "A1" }'

curl -X POST 'http://localhost:8080/hospital/VH/ward/A1' -H 'Content-Type: application/json' \
  -d '{ "bedNum": 12 }'

curl -X POST 'http://localhost:8080/patient' -H 'Content-Type: application/json' \
  -d '{ "hkid": "A1234563", "name": "Mary" }'

curl -X POST 'http://localhost:8080/hospital/VH/ward/A1/checkIn' -H 'Content-Type: application/json' \
  -d '{ "hkid": "A1234563", "bedNum": 12 }'
subscription {
  notification
}

mutation {
  createHospital(input: { hospCode: "VH" })
}

mutation {
  addWard(hospCode: "VH", input: { wardCode: "A1" }) {
    wardCode
  }
}

mutation {
  addBed(hospCode: "VH", wardCode: "A1", input: { bedNum: 12 }) {
    bedNum
  }
}


mutation {
  createPatient(input: { hkid: "A1234563", name: "Mary" })
}

mutation {
  checkIn(
    hospCode: "VH"
    wardCode: "A1"
    input: { hkid: "A1234563", bedNum: 12 }
  ) {
    hkid
    bedNum
  }
}

Query

curl -X GET 'http://localhost:8080/hospital/VH'

axon-graphql-starter's People

Contributors

hardyscc avatar ronaldcyha avatar

Watchers

 avatar  avatar  avatar

Forkers

ronaldcy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.