5.1.3-rc-20230226155756-f988d495 • Published 3 years ago

@envelop/validation-cache v5.1.3-rc-20230226155756-f988d495

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@envelop/validation-cache

This plugins adds simple LRU caching to your validate, to improve performance by caching the validation result.

This plugins improves performance of validating by ~50% (based on benchmarks).

Getting Started

yarn add @envelop/validation-cache

Usage Example

import { execute, parse, specifiedRules, subscribe, validate } from 'graphql'
import { envelop, useEngine } from '@envelop/core'
import { useValidationCache } from '@envelop/validation-cache'

const getEnveloped = envelop({
  plugins: [
    useEngine({ parse, validate, specifiedRules, execute, subscribe }),
    // ... other plugins ...
    useValidationCache({
      // options goes here
    })
  ]
})

API Reference

cache

Set this to pass in a cache instance. By default a new LRU cache is created using default max and ttl.

8.1.0

11 months ago

8.1.2

11 months ago

8.1.1

11 months ago

8.1.3

11 months ago

8.0.1

11 months ago

8.0.0

11 months ago

7.0.0

2 years ago

6.0.3

2 years ago

6.0.2

2 years ago

6.0.4

2 years ago

5.1.3

3 years ago

5.1.2

3 years ago

5.1.1

3 years ago

6.0.1

3 years ago

6.0.0

3 years ago

5.0.5

3 years ago

5.1.0

3 years ago

5.0.4

3 years ago

5.0.3

3 years ago

5.0.2

3 years ago

5.0.1

3 years ago

5.0.0

3 years ago

4.4.0

4 years ago

4.7.0

3 years ago

4.6.0

3 years ago

4.5.0

4 years ago

4.5.2

3 years ago

4.5.1

3 years ago

4.3.3

4 years ago

4.3.2

4 years ago

4.3.1

4 years ago

4.3.0

4 years ago

4.2.0

4 years ago

3.0.0

4 years ago

4.0.0

4 years ago

2.3.0

4 years ago

4.1.0

4 years ago

2.2.1

4 years ago

2.2.0

4 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago