class GraphQL::Rubocop::GraphQL::DefaultNullTrue

Identify (and auto-correct) any field configuration which duplicates the default null: true property.

null: true is default because nullable fields can always be converted to non-null fields (null: false) without a breaking change. (The opposite change, from null: false to null: true, change.)

Examples

Example: # Both of these define name: String in GraphQL:

# bad
field :name, String, null: true

# good
field :name, String