GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - iagopaixao/car-graphql-api: A simple and modern API GraphQL with Spring Boot and GraphQL Schema Publisher & Query Resolver - SPQR.

BranchesTags
Open more actions menu

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
docker
docker
 
 
gradle/wrapper
gradle/wrapper
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
lombok.config
lombok.config
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

Car GraphQL API

Build Status

This is a simple GraphQL model API written in JAVA 12 with Spring Boot and GraphQL Schema Publisher & Query Resolver - SPQR.

Environment Provisioning

  • Download the project: $ git clone https://github.com/euiagosilva/car-graphql-api.git
  • Solve dependencies: $ ./gradlew clean build -x test
  • Testing execution: $ ./gradlew test
  • Install Docker and Docker Compose in your OS;
  • Create the postgres database container: $ docker-compose -f docker/docker-compose-postgres.yml up

Run Application

  • Execute: $ ./gradlew bootRun
  • Access: http://localhost:8081/graphiql

Executing Operations

Mutations

  • Save a Car:

    mutation {
       saveCar(car: {
         brand: "BMW"
         color: "Black"
         description: "BMW M5 First Edition inspired by BMW Individual"
         price: 78.890
         year: 2017
         model: "M5 Sedan"
         isNew: false
       }) {
           id
       }
    }
    
  • Update a Car:

    mutation {
       updateCar(car: {
         id: 1
         brand: "BMW"
         color: "Yellow"
         description: "BMW M5 First Edition inspired by BMW Individual"
         price: 78.890
         year: 2018
         model: "M5 Sedan"
         isNew: false
       }) {
           id
       }
    }
    
  • Deletes a car by id:

    mutation {
      deleteCar(id: 1)
    }
    

Queries

  • Gets all cars:

    {
       cars {
         id
         brand
         color
       }
    }
    
  • Gets a car by id:

    { 
       car(id: 1) {
         price
         year
       }
    }
    

REST Support

It's possible perform REST operations on API using Swagger UI. Only access: http://localhost:8081/swagger-ui.hml;

Meta

Iago Paixão – [email protected]

distributed under MIT license

https://github.com/euiagosilva/car-graphql-api

About

A simple and modern API GraphQL with Spring Boot and GraphQL Schema Publisher & Query Resolver - SPQR.

github.com/euiagosilva/car-graphql-api

Topics

graphqlgraphql-javagraphql-java-12graphql-spqrgraphql-spring-bootspqr

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.