no-typename-prefix
â
 The "extends": "plugin:@graphql-eslint/schema-recommended" property in a configuration file
enables this rule.
đĄ This rule provides suggestions (opens in a new tab)
- Category: Schema
- Rule name: @graphql-eslint/no-typename-prefix
- Requires GraphQL Schema: falseâšī¸
- Requires GraphQL Operations: falseâšī¸
Enforces users to avoid using the type name in a field name while defining your schema.
Usage Examples
Incorrect
# eslint @graphql-eslint/no-typename-prefix: 'error'
 
type User {
  userId: ID!
}Correct
# eslint @graphql-eslint/no-typename-prefix: 'error'
 
type User {
  id: ID!
}