August 20, 2024
@envelop/core@5.0.2
Patch Changes
@envelop/on-resolve@4.1.1
Patch Changes
-
#2292
c3dd2c3
Thanks @ardatan! - Refactor the plugin to avoid extra promises with
`mapMaybePromise` -
Updated dependencies
[c3dd2c3
]:- @envelop/core@5.0.2
@envelop/rate-limiter@6.2.0
Minor Changes
-
#2292
c3dd2c3
Thanks @ardatan! - Now you can define a custom string interpolation
function to be used in the rate limit message. This is useful when you want to include dynamic
values in the message.useRateLimiter({ configByField: [ { type: 'Query', field: 'search', // You can also use glob patterns max: 10, window: '1m', message: 'My custom message with interpolated values: ${args.searchTerm} and ${context.user.id}' } ], interpolateMessage: (message, args, context) => { return message.replace(/\${(.*?)}/g, (_, key) => { return key.split('.').reduce((acc, part) => acc[part], { args, context }) }) } })
-
#2292
c3dd2c3
Thanks @ardatan! - New directive SDL;directive @rateLimit( max: Int window: String message: String identityArgs: [String] arrayLengthField: String readOnly: Boolean uncountRejected: Boolean ) on FIELD_DEFINITION
-
#2292
c3dd2c3
Thanks @ardatan! - Programmatic API to define rate limit
configuration in addition to directivesuseRateLimiter({ configByField: [ { type: 'Query', field: 'search', // You can also use glob patterns max: 10, window: '1m' } ] })
Patch Changes
-
#2292
c3dd2c3
Thanks @ardatan! - dependencies updates:- Updated dependency
graphql-rate-limit@^3.3.0
↗︎
(from3.3.0
, independencies
) - Added dependency
@graphql-tools/utils@^10.5.4
↗︎
(todependencies
) - Added dependency
minimatch@^10.0.1
↗︎ (to
dependencies
)
- Updated dependency
-
#2276
ba368ba
Thanks @deggertsen! - useRateLimiter will now accept all options
available to graphql-rate-limit getGraphQLRateLimiter function so that they are usable. -
Updated dependencies
[c3dd2c3
,
c3dd2c3
]:- @envelop/on-resolve@4.1.1
- @envelop/core@5.0.2