7.0.0 • Published 7 months ago

@envelop/parser-cache v7.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

@envelop/parser-cache

This plugins adds simple LRU caching to your parse, to improve performance by caching the parsed result.

This plugins improves performance of parsing by ~60% (based on benchmarks).

Getting Started

yarn add @envelop/parser-cache

Usage Example

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

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

API Reference

documentCache

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

errorCache

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

7.0.0

7 months ago

6.0.3

7 months ago

6.0.2

8 months ago

6.0.4

7 months ago

5.0.6

1 year ago

5.0.5

1 year ago

6.0.1

11 months ago

6.0.0

12 months ago

5.0.4

1 year ago

5.0.3

2 years ago

5.0.2

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

4.4.0

2 years ago

4.7.0

2 years ago

4.6.0

2 years ago

4.5.0

2 years ago

4.5.2

2 years ago

4.5.1

2 years ago

4.3.3

2 years ago

4.3.2

2 years ago

4.3.1

2 years ago

4.3.0

2 years ago

4.2.0

2 years ago

3.0.0

2 years ago

4.0.0

2 years ago

4.1.0

2 years ago

2.2.1

2 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago