class GraphQL::Schema::Validator::AllowNullValidator

Use this to specifically reject or permit nil values (given as null from GraphQL).

Examples

Example: require a non-null value for an argument if it is provided

argument :name, String, required: false, validates: { allow_null: false }