Browse Source

docs(harden-plugin): Add note on penalty when omitting take option

Michael Bromley 2 years ago
parent
commit
7a147a82a3
1 changed files with 4 additions and 0 deletions
  1. 4 0
      packages/harden-plugin/src/harden.plugin.ts

+ 4 - 0
packages/harden-plugin/src/harden.plugin.ts

@@ -83,6 +83,10 @@ import { HardenPluginOptions } from './types';
  * The complexity score is calculated by the [graphql-query-complexity library](https://www.npmjs.com/package/graphql-query-complexity),
  * The complexity score is calculated by the [graphql-query-complexity library](https://www.npmjs.com/package/graphql-query-complexity),
  * and by default uses the {@link defaultVendureComplexityEstimator}, which is tuned specifically to the Vendure Shop API.
  * and by default uses the {@link defaultVendureComplexityEstimator}, which is tuned specifically to the Vendure Shop API.
  *
  *
+ * {{% alert "warning" %}}
+ * Note: By default, if the "take" argument is omitted from a list query (e.g. the `products` or `collections` query), a default factor of 1000 is applied.
+ * {{% /alert %}}
+ *
  * The optimal max complexity score will vary depending on:
  * The optimal max complexity score will vary depending on:
  *
  *
  * - The requirements of your storefront and other clients using the Shop API
  * - The requirements of your storefront and other clients using the Shop API