🎉 Welcome to the new GraphQL-ESLint website. Try new playground page →
Rules
Lone Anonymous Operation

lone-anonymous-operation

✅ The "extends": "plugin:@graphql-eslint/operations-recommended" property in a configuration file enables this rule.

  • Category: Operations
  • Rule name: @graphql-eslint/lone-anonymous-operation
  • Requires GraphQL Schema: true ℹī¸
  • Requires GraphQL Operations: false ℹī¸

A GraphQL document that contains an anonymous operation (the query short-hand) is only valid if it contains only that one operation definition.

This rule is a wrapper around a graphql-js validation function.

Resources