Giter Club home page Giter Club logo

neighborhood's Introduction

Dev instructions

CRUD & Quarkus

Postgres โ€“ docker container

docker compose up
# docker run -d --rm --name my_reative_db \
#       -e POSTGRES_USER=user \
#       -e POSTGRES_PASSWORD=password 
#       -e POSTGRES_DB=my_db 
#       -p 5432:5432 postgres:11.5

# clean
docker rm $(docker ps -a -q) -f
docker volume prune

Run / Build

# live coding
./mvnw compile quarkus:dev

# native image
./mvnw package -Pnative -Dquarkus.native.container-build=true

GraphQL UI http://localhost:8080/q/graphql-ui/

GraphQL examples

query allOrganisations {
  allOrganisations {
    title
    createdDate
    zipCode
    id
    products {
      name
    }
  }
}

query getOrganisation {
  organisation(organisationId: 1) {
    title
    zipCode
    createdDate
  }
}

query getOrganisationAndProductName {
  organisation(organisationId: 1) {
    title
    zipCode
    createdDate
    products {
      name
    }
  }
}

mutation addOrganisation {
  createOrganisation(
    organisation: {title: "The Mask", createdDate: "1994-12-25", zipCode: "99098"}
  ) {
    title
    createdDate
    zipCode
  }
}

mutation updateOrganisation {
  updateOrganisation(organisationId: 1, organisation: {title: "The One"}) {
    title
  }
}

mutation deleteOrganisation {
  deleteOrganisation(organisationId: 1)
}

query allProducts {
  allProducts {
    name
    organisations {
      title
      zipCode
    }
  }
}

mutation addProductToOrganisation {
  addProductToOrganisation(organisationId: 1, productId: 4) {
    title
    createdDate
    zipCode
    products {
      name
    }
  }
}

mutation addOrganisationToProduct {
  addOrganisationToProduct(organisationId: 2, productId: 4) {
    name
    id
    organisations {
      title
      products {
        name
      }
    }
  }
}

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.