Cadastro de Pessoas utilizando Spring-Boot com GraphQL.
- CRUD
- API GraphQL
- Java OpenJDK 16
- Apache Maven >= 3.6.3
- Postman
- Java
- JPA
- Lombok
- Spring Boot
- Maven
- H2
- GraphQL
- Execute
mvn clean package
- Execute
mvn spring-boot:run
query {
findAllPerson {
id
name
dtBirth
age
genre
}
}
query {
findByIdPerson (id:1) {
id, name, genre, age
}
}
mutation {
createPerson (
person: {
name: "Luciano"
dtBirth: "1984-01-31"
genre: MALE
age: 36
}) {
id, name, age, genre
}
}
mutation {
updatePerson(person: {
id: 1,
name:"Ortiz",
age: 99,
dtBirth:"2020-09-18"
}) {
id
name
age
dtBirth
}
}
mutation {
deletePerson(id:1)
}