From 2c1a3012bae8862141a465d8f825027b58b11fc7 Mon Sep 17 00:00:00 2001 From: Caydie Tran Date: Mon, 14 Jan 2019 12:08:15 -0800 Subject: [PATCH] Add Clarification on How to Use Fragments (#4300) * Add more color to fragments.md * highlighted Person * Changelog update --- CHANGELOG.md | 3 ++- docs/source/advanced/fragments.md | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7738821c241..48a3e989e02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,8 @@ [@stubailo](https://github.com/stubailo) in [#4220](https://github.com/apollographql/apollo-client/pull/4220)
[@haysclark](https://github.com/haysclark) in [#4255](https://github.com/apollographql/apollo-client/pull/4255)
[@shelmire](https://github.com/shelmire) in [#4266](https://github.com/apollographql/apollo-client/pull/4266)
- [@peggyrayzis](https://github.com/peggyrayzis) in [#4280](https://github.com/apollographql/apollo-client/pull/4280) + [@peggyrayzis](https://github.com/peggyrayzis) in [#4280](https://github.com/apollographql/apollo-client/pull/4280)
+ [@caydie-tran](https://github.com/caydie-tran) in [#4300](https://github.com/apollographql/apollo-client/pull/4300) ### Apollo Utilities (vNext) diff --git a/docs/source/advanced/fragments.md b/docs/source/advanced/fragments.md index d1025ff4d18..d65062cfa5f 100644 --- a/docs/source/advanced/fragments.md +++ b/docs/source/advanced/fragments.md @@ -19,6 +19,8 @@ query GetPerson { } ``` +It's important to note that the component after the `on` clause is designated for the type we are selecting from. In this case, `people` is of type `Person` and we want to select the `firstName` and `lastName` fields from `people(id: "7)`. + There are two principal uses for fragments in Apollo: - Sharing fields between multiple queries, mutations or subscriptions.