Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/content/learn/Learn-Queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ That's why GraphQL includes reusable units called _fragments_. Fragments let you
}
}

# used by the character-rendering UI component
fragment comparisonFields on Character {
name
appearsIn
Expand All @@ -119,7 +120,7 @@ fragment comparisonFields on Character {
}
```

You can see how the above query would be pretty repetitive if the fields were repeated. The concept of fragments is frequently used to split complicated application data requirements into smaller chunks, especially when you need to combine lots of UI components with different fragments into one initial data fetch.
You can see how the above query would be pretty repetitive if the fields were repeated. The concept of fragments is frequently used to define data requirements of a UI component or utility, creating smaller composable chunks. This is especially beneficial when you need to combine lots of UI components with different fragments into one initial data fetch.

### Using variables inside fragments

Expand Down