# input-type-suffix

Source: https://api-genie.dev/docs/linter/graphql/rules/input-type-suffix

A rule of the GraphQL linter, which reads GraphQL schemas and operations. Since 0.9.0. In the rulesets: Recommended at warning, Strict at error, All at error.

This rule checks that input object type names end with a suffix, `Input` by default.

## Rule details

The suffix tells input types from the output types they often mirror, e.g. `User` and `UserInput`. Type extensions are not checked.

The rule applies to definitions. An `# apigenie-lint-disable input-type-suffix` comment on a node
turns it off for the node and everything nested in it; at the top of the file, separated from the
first definition by a blank line, the comment turns it off for the whole file.

## Configuration

The configuration block can be a string, the suffix, or an object with the `suffix`
property. The suffix cannot be empty.

```yaml
version: "1.0"
commands:
  lint:
    graphql:
      rules:
        input-type-suffix: [warning, Params]
```

## Examples

**Good**.

```graphql
input CreateUserInput { name: String }
```

**Bad**. The linter reports `Input object type 'CreateUser' should end with 'Input'`.

```graphql
input CreateUser { name: String }
```
