Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Fields can overlap when you are querying the same field with different arguments. In this video we will discuss the syntax for aliasing a field and show a query with the same field aliased twice.
Course repo: Use this GitHub repo to follow along with this video in the course
(Apollo's Launchpad has been deprecated, so your screen will look different)
New Terms:
- Fragment - Reusable sets of fields that can be included in multiple queries; saves time from needing to manually include the same fields over and over in many places
Further Reading:
GraphQL Fragments are the Best Match for UI Components by Samer Buna
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up