Skip to content

Commit 6d1c9d4

Browse files
update graphql example (#21532)
1 parent 846a562 commit 6d1c9d4

File tree

1 file changed

+3
-3
lines changed
  • src/content/docs/api-shield/security/graphql-protection

1 file changed

+3
-3
lines changed

src/content/docs/api-shield/security/graphql-protection/configure.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ API Shield customers now have three new fields available in custom rules:
133133
- `cf.api_gateway.graphql.parsed_successfully` describes whether Cloudflare was able to parse the query. Presently, we run best-effort parsing, meaning we might not be able to parse some valid queries. This means that you must use a `and cf.api_gateway.graphql.parsed_successfully` filter in your custom rules when deploying GraphQL security rules.
134134
<br />
135135

136-
For example, you can deploy the following rule via the API or the dashboard to block queries that are deeply nested but ask for a few fields.
136+
For example, you can deploy the following rule via the API or the dashboard to block queries that are deeply nested and ask for over 30 fields.
137137

138-
```
139-
(cf.api_gateway.graphql.query_size < 3 and cf.api_gateway.graphql.query_depth > 15 and cf.api_gateway.graphql.parsed_successfully)
138+
```txt wrap
139+
(cf.api_gateway.graphql.query_size > 30 and cf.api_gateway.graphql.query_depth > 7 and cf.api_gateway.graphql.parsed_successfully)
140140
```
141141

142142
:::note

0 commit comments

Comments
 (0)