Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the reason argument in @deprecated non-nullable #1040

Merged
merged 3 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
13 changes: 7 additions & 6 deletions spec/Section 4 -- Introspection.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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

Expand Down
Loading