Skip to content
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
14 changes: 14 additions & 0 deletions docs/source/data/fragments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1790,3 +1790,17 @@
- `Unmasked<TData>` - Unwraps `TData` into the full result type

For more information about other overridable types in Apollo Client, see the [TypeScript guide](../development-testing/static-typing).

## Troubleshooting

Check notice on line 1794 in docs/source/data/fragments.mdx

View check run for this annotation

Apollo Librarian / AI Style Review

docs/source/data/fragments.mdx#L1794

**Structural Elements**: Conceptual overview headings should use gerunds. ```suggestion ## Troubleshoot fragments ```

### Unique names

Fragment names must be unique across your entire application. If you reuse a fragment name, `graphql-tag` provides a warning about the conflict at runtime to help you identify the issue:

Check notice on line 1798 in docs/source/data/fragments.mdx

View check run for this annotation

Apollo Librarian / AI Style Review

docs/source/data/fragments.mdx#L1798

**Products and Features**: Do not use code formatting or backticks for standalone product or feature names like graphql-tag. **Verb Tense and Voice**: Use present tense instead of 'provides a warning'. **Voice**: Use an authoritative tone to prescribe the correct approach for fragment naming. **Word and Symbol Usage**: Avoid semicolons; use a period to separate independent clauses for better clarity. ```suggestion Fragment names must be unique across your entire application. If you reuse a fragment name, graphql-tag provides a warning about the conflict at runtime to help you identify the issue: ```

```text
Warning: fragment with name SomeFragment already exists.
graphql-tag enforces all fragment names across your application to be unique; read more about
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names
```

As a best practice, use descriptive, component-scoped fragment names (like `CartItemFragment` or `UserProfileCardFragment`) to avoid name collisions.
Loading