Skip to content

Latest commit

 

History

History
16 lines (8 loc) · 399 Bytes

17-adding-a-mutation-on-server.md

File metadata and controls

16 lines (8 loc) · 399 Bytes

Adding a Mutation on the Server

Aim: To Change the Brightness Level on a Light

Steps:

  1. Update the schema to add a setBrightness mutation, taking an ID and an Int.

  2. Create a setBrightness function which finds the Light with that ID and sets its brightnessLevel to the incoming parameter.

  3. Your function should return the updated Light.

  4. Test this in GraphiQL.