/graphql

Pizza 4 - Playing with backend

In this lesson you will finally “eat your pizza” through playing with pizza menu backend.

Code used in this Lesson

Menu.gql
{
  pizzas{
    name
    desciption
    price
    id
  }
}
AddPizza.gql
mutation {
  addPizza({
    pizza:{
      price: 2000,
      name: "Capriciosa",
      description: "dough, cheese, mushrooms, ham, tomatoes"
    }
  })
}
UpdatePizza.gql
mutation {
  updatePizza({
    pizza:{
      id: "Id returned from menu",
      price: 3000
    }
  })
}
RemovePizza.gql
mutation {
  removePizza({
    pizza:{
      id: "Id returned from menu"
    }
  })
}