Skip to content

MatheusVict/Spring-Graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot - GraphQL - API

A Spring Boot GraphQL API for products and categories manager.

  • O Mermaid é uma opção bem legal para diagramas e você consegue utilizar diretamente no README.md:

spring-boot-graphql-banner

Dependencies and Technologies Used

  • Java - Version: 17
  • Spring Boot - Version: 3.2.2

Getting started

./mvnw clean package

After that:

java -jar target/spring-with-graphql-0.0.1-SNAPSHOT.jar

After that you can access the application at http://localhost:8080/graphiql and it'll show you the GraphiQL interface.

Schemas

 mutation {
    addCategory(category: {name: "Star Wars"}) {
        name
        id
    }
}


query {
    categoryById(id: "c40f9427-87fe-452b-9038-e2e33d82b701") {
        name
        id
    }
}

mutation {
    addProduct(productInput:{name: "anakin figure action",
        price: 100,
        categoryId: "7f1e22ec-c621-4ecc-a9c9-8808383d98b5"
    }) {
        id
    }
}

query {
    getAllProducts{
        id,
        category {
            id,
            name
        }
    }
}

About

A Spring boot API with Graphql

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages