@envelop/graphql-jit 5.0.0 → 5.0.1
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.
- package/README.md +6 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,13 +11,13 @@ yarn add @envelop/graphql-jit
|
|
|
11
11
|
## Usage Example
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
|
-
import { parse, validate, execute, subscribe } from 'graphql'
|
|
14
|
+
import { parse, validate, specifiedRules, execute, subscribe } from 'graphql'
|
|
15
15
|
import { envelop, useEngine } from '@envelop/core'
|
|
16
16
|
import { useGraphQlJit } from '@envelop/graphql-jit'
|
|
17
17
|
|
|
18
18
|
const getEnveloped = envelop({
|
|
19
19
|
plugins: [
|
|
20
|
-
useEngine({ parse, validate, execute, subscribe }),
|
|
20
|
+
useEngine({ parse, validate, specifiedRules, execute, subscribe }),
|
|
21
21
|
// ... other plugins ...
|
|
22
22
|
useGraphQlJit(
|
|
23
23
|
{
|
|
@@ -36,13 +36,13 @@ const getEnveloped = envelop({
|
|
|
36
36
|
If you wish to conditionally use the JIT executor based on the incoming request, you can use `enableIf` config flag and return a `boolean` based on the `ExecutionArgs`:
|
|
37
37
|
|
|
38
38
|
```ts
|
|
39
|
-
import { parse, validate, execute, subscribe } from 'graphql'
|
|
39
|
+
import { parse, validate, specifiedRules, execute, subscribe } from 'graphql'
|
|
40
40
|
import { envelop, useEngine } from '@envelop/core'
|
|
41
41
|
import { useGraphQlJit } from '@envelop/graphql-jit'
|
|
42
42
|
|
|
43
43
|
const getEnveloped = envelop({
|
|
44
44
|
plugins: [
|
|
45
|
-
useEngine({ parse, validate, execute, subscribe }),
|
|
45
|
+
useEngine({ parse, validate, specifiedRules, execute, subscribe }),
|
|
46
46
|
// ... other plugins ...
|
|
47
47
|
useGraphQlJit(
|
|
48
48
|
{
|
|
@@ -61,13 +61,13 @@ const getEnveloped = envelop({
|
|
|
61
61
|
You can configure the JIT cache with the following options:
|
|
62
62
|
|
|
63
63
|
```ts
|
|
64
|
-
import { parse, validate, execute, subscribe } from 'graphql'
|
|
64
|
+
import { parse, validate, specifiedRules, execute, subscribe } from 'graphql'
|
|
65
65
|
import { envelop, useEngine } from '@envelop/core'
|
|
66
66
|
import { useGraphQlJit } from '@envelop/graphql-jit'
|
|
67
67
|
|
|
68
68
|
const getEnveloped = envelop({
|
|
69
69
|
plugins: [
|
|
70
|
-
useEngine({ parse, validate, execute, subscribe }),
|
|
70
|
+
useEngine({ parse, validate, specifiedRules, execute, subscribe }),
|
|
71
71
|
// ... other plugins ...
|
|
72
72
|
useGraphQlJit(
|
|
73
73
|
{
|
package/package.json
CHANGED