noOnePlaceFragments
| Property | Value |
|---|---|
| Config name | noOnePlaceFragments |
| Default severity | — |
| Context | Project |
| In recommended | No |
What it checks
Section titled “What it checks”Detect fragments used in only one place.
Examples
Section titled “Examples”# ❌ Bad — fragment used only oncefragment UserFields on User { id name}
query GetUser { user { ...UserFields }}# ✅ Good — inline the fieldsquery GetUser { user { id name }}Configuration
Section titled “Configuration”extensions: graphql-analyzer: lint: rules: noOnePlaceFragments: warn