From b0dfb671306fa847ed9c327ac693e3ae50e56765 Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Wed, 23 Aug 2023 17:57:57 +0200 Subject: [PATCH 1/3] Make the reason argument in `@deprecated` non-nullable --- spec/Section 3 -- Type System.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/Section 3 -- Type System.md b/spec/Section 3 -- Type System.md index d32b08566..368d79668 100644 --- a/spec/Section 3 -- Type System.md +++ b/spec/Section 3 -- Type System.md @@ -2099,7 +2099,7 @@ condition is false. ```graphql directive @deprecated( - reason: String = "No longer supported" + reason: String! = "No longer supported" ) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE ``` From fb386932c89b4fd58856badbc449332e61f6925c Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Fri, 22 Nov 2024 19:02:39 +0100 Subject: [PATCH 2/3] update language for deprecationReason --- spec/Section 4 -- Introspection.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/spec/Section 4 -- Introspection.md b/spec/Section 4 -- Introspection.md index 3054a9f6c..37c16996b 100644 --- a/spec/Section 4 -- Introspection.md +++ b/spec/Section 4 -- Introspection.md @@ -424,7 +424,8 @@ Fields\: this field. - `isDeprecated` returns {true} if this field should no longer be used, otherwise {false}. -- `deprecationReason` optionally provides a reason why this field is deprecated. +- `deprecationReason` returns the reason why this field is deprecated, or null + if this field is not deprecated. ### The \_\_InputValue Type @@ -442,8 +443,8 @@ Fields\: provided at runtime. If this input value has no default value, returns {null}. - `isDeprecated` returns {true} if this input field or argument should no longer be used, otherwise {false}. -- `deprecationReason` optionally provides a reason why this input field or - argument is deprecated. +- `deprecationReason` returns the reason why this input field or argument is + deprecated, or null if the input field or argument is not deprecated. ### The \_\_EnumValue Type @@ -455,8 +456,8 @@ Fields\: - `description` may return a String or {null} - `isDeprecated` returns {true} if this enum value should no longer be used, otherwise {false}. -- `deprecationReason` optionally provides a reason why this enum value is - deprecated. +- `deprecationReason` returns the reason why this enum value is deprecated, or + null if the enum value is not deprecated. ### The \_\_Directive Type From 665bf71a004441c4e18a269aa604d6dcc215049b Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Fri, 22 Nov 2024 19:03:43 +0100 Subject: [PATCH 3/3] add missing bang --- spec/Section 4 -- Introspection.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/Section 4 -- Introspection.md b/spec/Section 4 -- Introspection.md index 37c16996b..7d196b2a1 100644 --- a/spec/Section 4 -- Introspection.md +++ b/spec/Section 4 -- Introspection.md @@ -110,7 +110,7 @@ CommonMark-compliant Markdown renderer. To support the management of backwards compatibility, GraphQL fields, arguments, input fields, and enum values can indicate whether or not they are deprecated -(`isDeprecated: Boolean`) along with a description of why it is deprecated +(`isDeprecated: Boolean!`) along with a description of why it is deprecated (`deprecationReason: String`). Tools built using GraphQL introspection should respect deprecation by