More Mutations

Voting for links

With the authentication part done, it’s time to introduce a new feature into the system - voting! The user is supposed to be able to vote for the links they like, so that later the links can be ordered by popularity. Almost like the real Hackernews!

This one will require quite a few steps, so buckle up!

  1. Schema needs changes first. (Surprised? … I didn’t expect so)

  2. Create the analogous data and resolver classes.

Unlock the next chapter
What kind of input arguments can mutations take?
All types (scalars, objects, lists, interfaces and unions) can be used as inputs
Only scalars, objects and lists can be used as inputs
Only scalars can be input types, nested structures are not allowed
Mutations can not take input arguments