Challenge: Pizza Schema
Take the challenge below to test your knowledge of the GraphQL schema.
We'll cover the following
Problem statement
-
Write a GraphQL schema to update a pizza.
-
Go to line 58 on the widget below and write the implementation.
-
The mutation name is
updatePizza
. -
The
updatePizza
must have anid
ofInt
. Thetoppings
field should have aList
ofobject
with anid
property ofInt
as an argument. Thepizza
can beString
, but this is optional. -
The mutation
updatePizza
will resolve to thePizza
object. -
Pizza
contains anid
ofInt
(non-null), apizza
ofString
(non-null), andtoppings
(List
) fields. TheToppings
fields contain anid
ofInt
(non-null) and atopping
ofString
(non-null).
.
Get hands-on with 1400+ tech skills courses.