Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit c9b39a0

Browse files
committed
update deprecated description
1 parent 9bfbde4 commit c9b39a0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

guides/v2.3/graphql/develop/create-graphqls-file.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,14 @@ url_key: String @doc(description: "The url key assigned to the product")
9999
product_count: Int @doc(description: "The number of products")
100100
```
101101

102-
Use the `@deprecated` directive to mark a query, mutation, or attribute as deprecated:
103-
104-
```text
105-
@deprecated(reason: "description")
106-
```
102+
Use the `@deprecated` directive to deprecate attributes and enum values. The GraphQL specification does not permit deprecating input values or arguments. Describe why the attribute was deprecated or provide an alternative attribute, if applicable.
107103

108104
For example:
109105

110106
```text
111107
type Query {
112108
cmsPage (
113-
id: Int @doc(description: "Id of the CMS page") @deprecated(reason: "Use `identifier`") @doc(description: "The CMS page ...")
109+
id: Int @doc(description: "Id of the CMS page") @deprecated(reason: "Use `identifier` instead.") @doc(description: "The CMS page ...")
114110
identifier: String @doc(description: "Identifier of the CMS page")
115111
...
116112
```

0 commit comments

Comments
 (0)