# no-deprecated

Source: https://apigenie.pl/docs/linter/graphql/rules/no-deprecated

This rule checks that operations don't use deprecated fields, arguments and enum values.

## Rule Details

Deprecated elements will be removed from the schema; operations using them will break. The message includes the reason of the deprecation.

## Configuration

This rule has no options.

```yaml
version: "1.0"
commands:
  lint:
    graphql:
      rules:
        no-deprecated: warning
```

The rule can be disabled for a node and everything nested in it with an `# apigenie-lint-disable no-deprecated` comment on the node, or for a whole file with the comment at the top of the file, separated from the first definition by a blank line. It applies to operations and fragments.

## Examples

**Good**.

```graphql
query Me { me { name } }
```

**Bad**. The linter reports `The field 'User.login' is deprecated: Use name.`.

```graphql
query Me { me { login } }
```

## Compatibility

The rule checks operations against the schema files named by the `schema` property of the configuration, or against the type system of their own document. It reports nothing without a schema.
