Skip to content

Commit 4952391

Browse files
committed
asd
1 parent d0c9307 commit 4952391

File tree

3 files changed

+169
-64
lines changed

3 files changed

+169
-64
lines changed

packages/web/docs/src/content/router/configuration/authorization.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ The router supports two modes for handling unauthorized field access:
1717

1818
- **`filter` (default mode):** This mode silently removes any fields from the incoming GraphQL
1919
operation that the user is not authorized to access. For each field removed, a corresponding
20-
authorization error is added to the `errors` list in the GraphQL response, while the rest of
21-
the accessible data is returned as requested.
20+
authorization error is added to the `errors` list in the GraphQL response, while the rest of the
21+
accessible data is returned as requested.
2222
- **`reject` mode:** In this mode, the router will reject any GraphQL operation that attempts to
2323
access one or more unauthorized fields. The entire request is denied, and a descriptive error is
2424
returned.
@@ -62,7 +62,8 @@ type Query {
6262
admin: AdminPanel @requiresScopes(scopes: [["admin:users"], ["admin:system"]])
6363

6464
# User must have read:users AND (admin:users OR admin:system)
65-
reports: [Report] @requiresScopes(scopes: [["read:users", "admin:users"], ["read:users", "admin:system"]])
65+
reports: [Report]
66+
@requiresScopes(scopes: [["read:users", "admin:users"], ["read:users", "admin:system"]])
6667
}
6768
```
6869

@@ -73,7 +74,8 @@ type Query {
7374
- **Type:** `boolean`
7475
- **Default:** `true`
7576

76-
Whether to enable authorization directives processing. Set to `false` to disable authorization checks entirely.
77+
Whether to enable authorization directives processing. Set to `false` to disable authorization
78+
checks entirely.
7779

7880
### `unauthorized.mode`
7981

packages/web/docs/src/content/router/configuration/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ Some configuration variables can be overridden at runtime using
1313
This page covers all the main configuration options available. Each option links to a detailed page
1414
that explains how to use that feature.
1515

16-
- [`authorization`](./configuration/authorization): Define field-level access control using directives.
16+
- [`authorization`](./configuration/authorization): Define field-level access control using
17+
directives.
1718
- [`cors`](./configuration/cors): Control cross-origin requests to your API.
1819
- [`csrf`](./configuration/csrf): Protect against cross-site request forgery attacks.
1920
- [`headers`](./configuration/headers): Modify HTTP headers between clients and subgraphs.

0 commit comments

Comments
 (0)