Linter rulesGraphQLinput-type-suffix
input-type-suffix
Since 0.9.0
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.
Configuration
The configuration block can be a string, the suffix, or an object with the suffix
property. The suffix cannot be empty.
version: "1.0"
commands:
lint:
graphql:
rules:
input-type-suffix: [warning, Params]
The rule can be disabled for a node and everything nested in it with an # apigenie-lint-disable input-type-suffix 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.
input CreateUserInput { name: String }
Bad. The linter reports Input object type 'CreateUser' should end with 'Input'.
input CreateUser { name: String }