Skip to content

Editorial: Clarify intro for inline fragments #969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 27, 2022
Merged
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
11 changes: 7 additions & 4 deletions spec/Section 2 -- Language.md
Original file line number Diff line number Diff line change
Expand Up @@ -667,10 +667,13 @@ be present and `likers` will not. Conversely when the result is a `Page`,

InlineFragment : ... TypeCondition? Directives? SelectionSet

Fragments can be defined inline within a selection set. This is done to
conditionally include fields based on their runtime type. This feature of
standard fragment inclusion was demonstrated in the `query FragmentTyping`
example. We could accomplish the same thing using inline fragments.
Fragments can also be defined inline within a selection set. This is useful for
conditionally including fields based on a type condition or applying a directive
to a selection set.

This feature of standard fragment inclusion was demonstrated in the
`query FragmentTyping` example above. We could accomplish the same thing using
inline fragments.

```graphql example
query inlineFragmentTyping {
Expand Down