# input-no-circular-non-null

Source: https://apigenie.pl/docs/linter/graphql/rules/input-no-circular-non-null

This rule checks that input object types don't reference themselves through non-null fields.

## Rule Details

No value can satisfy an input object type that requires itself, directly or through other input types, through non-null fields; the specification forbids it. Nullable and list fields break the cycle.

## Configuration

This rule has no options.

```yaml
version: "1.0"
commands:
  lint:
    graphql:
      rules:
        input-no-circular-non-null: warning
```

The rule can be disabled for a node and everything nested in it with an `# apigenie-lint-disable input-no-circular-non-null` 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 definitions.

## Examples

**Good**.

```graphql
input Filter { and: [Filter!], not: Filter }
```

**Bad**. The linter reports `Cannot reference Input Object "Filter" within itself through a series of non-null fields: "not".`.

```graphql
input Filter { not: Filter! }
```
