@envelop/on-resolve 2.0.0 → 2.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 +4 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,14 +15,14 @@ yarn add @envelop/on-resolve
|
|
|
15
15
|
### Custom field resolutions
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
|
-
import { parse, validate, execute, subscribe } from 'graphql'
|
|
18
|
+
import { parse, validate, specifiedRules, execute, subscribe } from 'graphql'
|
|
19
19
|
import { envelop, useEngine } from '@envelop/core'
|
|
20
20
|
import { useOnResolve } from '@envelop/on-resolve'
|
|
21
21
|
import { specialResolver } from './my-resolvers'
|
|
22
22
|
|
|
23
23
|
const getEnveloped = envelop({
|
|
24
24
|
plugins: [
|
|
25
|
-
useEngine({ parse, validate, execute, subscribe }),
|
|
25
|
+
useEngine({ parse, validate, specifiedRules, execute, subscribe }),
|
|
26
26
|
// ... other plugins ...
|
|
27
27
|
useOnResolve(async function onResolve({ context, root, args, info, replaceResolver }) {
|
|
28
28
|
// replace special field's resolver
|
|
@@ -44,7 +44,7 @@ const getEnveloped = envelop({
|
|
|
44
44
|
### Tracing
|
|
45
45
|
|
|
46
46
|
```ts
|
|
47
|
-
import { parse, validate, execute, subscribe } from 'graphql'
|
|
47
|
+
import { parse, validate, specifiedRules, execute, subscribe } from 'graphql'
|
|
48
48
|
import { envelop, useEngine, Plugin } from '@envelop/core'
|
|
49
49
|
import { useOnResolve } from '@envelop/on-resolve'
|
|
50
50
|
|
|
@@ -94,7 +94,7 @@ function useFieldTracing() {
|
|
|
94
94
|
|
|
95
95
|
const getEnveloped = envelop({
|
|
96
96
|
plugins: [
|
|
97
|
-
useEngine({ parse, validate, execute, subscribe }),
|
|
97
|
+
useEngine({ parse, validate, specifiedRules, execute, subscribe }),
|
|
98
98
|
// ... other plugins ...
|
|
99
99
|
useSpecialResolve()
|
|
100
100
|
]
|
package/package.json
CHANGED