Skip to content

Commit 69af26c

Browse files
authored
fix/docs(gateway/demandControl) - use the correct name for operationTypeCost (#6914)
1 parent 60e0d35 commit 69af26c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/web/docs/src/content/gateway/other-features/security/demand-control.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const gatewayConfig = defineConfig({
3939
* Cost based on the operation type.
4040
* By default, mutations have a cost of 10, queries and subscriptions have a cost of 0.
4141
*/
42-
operationCost: operationType => (operationType === 'mutation' ? 10 : 0),
42+
operationTypeCost: operationType => (operationType === 'mutation' ? 10 : 0),
4343
/**
4444
* Cost based on the field.
4545
* It is called for each field in the operation, and overrides the `@cost` directive.
@@ -62,7 +62,7 @@ export const gatewayConfig = defineConfig({
6262

6363
When a query is planned by the gateway,
6464

65-
- For each operation, the `operationCost` function is called with the operation type. (By default
65+
- For each operation, the `operationTypeCost` function is called with the operation type. (By default
6666
only mutations have a cost `10`)
6767
- For each field in the operation, the `fieldCost` function is called with the field node. (By
6868
default fields have a cost of `0`)

0 commit comments

Comments
 (0)