uniqueNames
| Property | Value |
|---|---|
| Config name | uniqueNames |
| Default severity | error |
| Context | Project |
| In recommended | No |
What it checks
Section titled “What it checks”Ensures that all operation and fragment names are unique across the entire project. Duplicate names cause issues with persisted queries, code generation, and debugging.
Examples
Section titled “Examples”query GetUser { user { id }}
# file2.graphqlquery GetUser { # ❌ Error: Duplicate operation name 'GetUser' user { name }}Configuration
Section titled “Configuration”extensions: graphql-analyzer: lint: rules: uniqueNames: error # or warn, offThis is a project-wide rule — it checks all documents together. It may be slower on large projects.