@envelop/rate-limiter 3.4.0 → 3.4.1-alpha-72027859.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -8
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -11,21 +11,21 @@ yarn add @envelop/rate-limiter
11
11
  ## Usage Example
12
12
 
13
13
  ```ts
14
- import { envelop } from '@envelop/core';
15
- import { useRateLimiter, IdentifyFn } from '@envelop/rate-limiter';
14
+ import { envelop } from '@envelop/core'
15
+ import { useRateLimiter, IdentifyFn } from '@envelop/rate-limiter'
16
16
 
17
17
  const identifyFn: IdentifyFn = async context => {
18
- return context.request.ip;
19
- };
18
+ return context.request.ip
19
+ }
20
20
 
21
21
  const getEnveloped = envelop({
22
22
  plugins: [
23
23
  // ... other plugins ...
24
24
  useRateLimiter({
25
- identifyFn,
26
- }),
27
- ],
28
- });
25
+ identifyFn
26
+ })
27
+ ]
28
+ })
29
29
  ```
30
30
 
31
31
  > By default, we assume that you have the GraphQL directive definition as part of your GraphQL schema (`directive @rateLimit(max: Int, window: String, message: String) on FIELD_DEFINITION`).
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@envelop/rate-limiter",
3
- "version": "3.4.0",
3
+ "version": "3.4.1-alpha-72027859.0",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "@envelop/core": "^2.4.0",
6
+ "@envelop/core": "2.4.1-alpha-72027859.0",
7
7
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
8
8
  },
9
9
  "dependencies": {