From 7dbea56f76b0a9ae909576fbfae0cccfbaae6539 Mon Sep 17 00:00:00 2001 From: hoshinotsuyoshi Date: Mon, 26 Feb 2024 20:36:44 +0900 Subject: [PATCH] Add `pattern` argument --- lib/graphql/constraint/directive/constraint.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/graphql/constraint/directive/constraint.rb b/lib/graphql/constraint/directive/constraint.rb index cb8c472..adca124 100644 --- a/lib/graphql/constraint/directive/constraint.rb +++ b/lib/graphql/constraint/directive/constraint.rb @@ -12,6 +12,7 @@ class Constraint < GraphQL::Schema::Directive description "validate GraphQL fields" argument :max_length, Int, required: false, description: "validate max length for String" argument :min_length, Int, required: false, description: "validate min length for String" + argument :pattern, String, required: false, description: "validate pattern for String" argument :max, Int, required: false, description: "validate max length for Int" argument :min, Int, required: false, description: "validate min length for Int" locations INPUT_FIELD_DEFINITION