run project normally
mvn spring-boot:run
the project has a dependency called graphiql-spring-boot-starter with serve a gui client for run querys graphQL on the port
http://localhost:8080/graphiql
for h2 console
http://localhost:8080/h2-console
Example for get all trainers
query {
getAllTrainers {
id
name
age
gym {
id
name
},
pokemons {
id
name
category
},
insignias {
id
name
}
}
}
Example of Mutation that create a new Trainer this create a new trainer and return ID created
mutation {
createTrainer(trainer: {name: "Gary", age: 15}) {
id
}
}