diff --git a/src/Utils/BuildClientSchema.php b/src/Utils/BuildClientSchema.php index 33276c04b..13d157868 100644 --- a/src/Utils/BuildClientSchema.php +++ b/src/Utils/BuildClientSchema.php @@ -522,6 +522,7 @@ public function buildInputValue(array $inputValueIntrospection): array $inputValue = [ 'description' => $inputValueIntrospection['description'], + 'deprecationReason' => $inputValueIntrospection['deprecationReason'] ?? null, 'type' => $type, ]; diff --git a/tests/Utils/BuildClientSchemaTest.php b/tests/Utils/BuildClientSchemaTest.php index 8d7e17599..677062481 100644 --- a/tests/Utils/BuildClientSchemaTest.php +++ b/tests/Utils/BuildClientSchemaTest.php @@ -521,13 +521,19 @@ enum Color { """So sickening""" MAUVE @deprecated(reason: "No longer in fashion") } - + + input ColorInput { + oldColor: String @deprecated(reason: "Use color") + color: String + } + type Query { """This is a shiny string field""" shinyString: String - + """This is a deprecated string field""" deprecatedString: String @deprecated(reason: "Use shinyString") + paint(oldColor: String @deprecated(reason: "Use color"), color: String, input: ColorInput): Color color: Color } ');