Clone Repository
git clone https://github.com/sadabnepal/graphql-dev-test.git
cd graphql-dev-test
npm install
npm start
http://localhost:8000/graphql
query Burger($name: String!, $vegan: Boolean!) {
burger (name: $name) {
id
name
tomato
cheese @skip(if: $vegan)
inStock
price
}
}
variable
{
"vegan": false,
"name": "Veggie Delight"
}
- Implement Burger concept in graphql query and mutation
- Refer https://hygraph.com/blog/graphql-vs-rest-apis
{
burgers(where: { name: "cheeseburger"})
name
description
price
calories
inStock
}