This examples is an backend of Graphql CRUD
- Go to site to test api
- Add URL service: https://salty-escarpment-98757.herokuapp.com/
- Add queries that are at the bottom
- Mongo DB
- NodeJS
- GraphQL Yoga
- Docker
- Install docker
- Intall docker compose
- Run
docker-compose build - Run
docker-compose up - Go to localhost:4000
- Fork and enjoy!
I created an example with Angular, you can fork the project in my other repo
{
character{
id
name
race
image
power
}
}
mutation createCharacter{
createCharacter(
name: "Goku kid",
power:"11",
image:"https://i.pinimg.com/originals/3a/bc/7d/3abc7db51ec2f3671ad5eb4aef15db8b.png",
race:"Sayan"){
name
power
race
image
}
}
mutation updateCharacter(
$id: ID!
$name: String!
$power: String!
$image: String!
$race: String!
) {
updateCharacter(
id: $id
name: $name
power: $power
image: $image
race: $race
) {
id
name
power
race
image
}
}
mutation deleteCharacter($name: String!) {
deleteCharacter(name: $name)
}subscription newCharacter {
newCharacter {
id
name
power
image
race
}
}
subscription oldCharacter {
oldCharacter
}
