Check out a free preview of the full Client-Side GraphQL in React course

The "Fragments Exercise" Lesson is part of the full, Client-Side GraphQL in React course featured in this preview video. Here's what you'd learn in this lesson:

Students are instructed to write fragments for every types, and make sure to add them to the mutations too.

Preview
Close

Transcript from the "Fragments Exercise" Lesson

[00:00:00]
>> Scott Moss: I'm gonna set you off on your last exercise, which is basically, you're gonna be doing two things. You're gonna extend the pet type to have a new field on it, like vaccinated, if the pet is vaccinated or not. And you're gonna resolve it to some value and make sure you add that to your Apollo Client.

[00:00:19]
And then you need to create some fragments for all the pet types, just like I did, if you haven't done it already. And update those fragments to exist onto all pets and the new pet mutation.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now