Steps:
-
Update the schema to add a
setBrightness
mutation, taking anID
and anInt
. -
Create a
setBrightness
function which finds theLight
with thatID
and sets itsbrightnessLevel
to the incoming parameter. -
Your function should return the updated
Light
. -
Test this in GraphiQL.