@@ -265,6 +265,18 @@ class DairyProductInput < BaseInputObject
265
265
argument :old_source , String , required : false , deprecation_reason : "No longer supported"
266
266
end
267
267
268
+ class PreparedDateInput < BaseInputObject
269
+ description "Input with prepared value"
270
+ argument :date , String , description : "date as a string" , required : false
271
+ argument :deprecated_date , String , description : "date as a string" , required : false , deprecation_reason : "Use date"
272
+
273
+ def prepare
274
+ return nil unless date || deprecated_date
275
+
276
+ Date . parse ( date || deprecated_date )
277
+ end
278
+ end
279
+
268
280
class DeepNonNull < BaseObject
269
281
field :non_null_int , Integer , null : false do
270
282
argument :returning , Integer , required : false
@@ -492,6 +504,7 @@ class DairyAppMutation < BaseObject
492
504
field :push_value , [ Integer ] , null : false , description : "Push a value onto a global array :D" do
493
505
argument :value , Integer , as : :val
494
506
argument :deprecated_test_input , DairyProductInput , required : false
507
+ argument :prepared_test_input , PreparedDateInput , required : false
495
508
end
496
509
def push_value ( val :)
497
510
GLOBAL_VALUES << val
0 commit comments