@envelop/execute-subscription-event 3.0.0 → 3.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.
Files changed (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -7,14 +7,14 @@ Utilities for hooking into the [ExecuteSubscriptionEvent](<https://spec.graphql.
7
7
  Create a new context object per `ExecuteSubscriptionEvent` phase, allowing to bypass common issues with context objects such as [`DataLoader`](https://github.com/n1ru4l/envelop/issues/80) [caching](https://github.com/graphql/graphql-js/issues/894) [issues](https://github.com/apollographql/subscriptions-transport-ws/issues/330).
8
8
 
9
9
  ```ts
10
- import { parse, validate, execute, subscribe } from 'graphql'
10
+ import { parse, validate, specifiedRules, execute, subscribe } from 'graphql'
11
11
  import { envelop, useEngine } from '@envelop/core'
12
12
  import { useContextValuePerExecuteSubscriptionEvent } from '@envelop/execute-subscription-event'
13
13
  import { createContext, createDataLoaders } from './context'
14
14
 
15
15
  const getEnveloped = envelop({
16
16
  plugins: [
17
- useEngine({ parse, validate, execute, subscribe }),
17
+ useEngine({ parse, validate, specifiedRules, execute, subscribe }),
18
18
  useContext(() => createContext()),
19
19
  useContextValuePerExecuteSubscriptionEvent(() => ({
20
20
  // Existing context is merged with this context partial
@@ -31,14 +31,14 @@ const getEnveloped = envelop({
31
31
  Alternatively, you can also provide a callback that is invoked after each [`ExecuteSubscriptionEvent`](<https://spec.graphql.org/draft/#ExecuteSubscriptionEvent()>) phase.
32
32
 
33
33
  ```ts
34
- import { parse, validate, execute, subscribe } from 'graphql'
34
+ import { parse, validate, specifiedRules, execute, subscribe } from 'graphql'
35
35
  import { envelop, useEngine } from '@envelop/core'
36
36
  import { useContextValuePerExecuteSubscriptionEvent } from '@envelop/execute-subscription-event'
37
37
  import { createContext, createDataLoaders } from './context'
38
38
 
39
39
  const getEnveloped = envelop({
40
40
  plugins: [
41
- useEngine({ parse, validate, execute, subscribe }),
41
+ useEngine({ parse, validate, specifiedRules, execute, subscribe }),
42
42
  useContext(() => createContext()),
43
43
  useContextValuePerExecuteSubscriptionEvent(({ args }) => ({
44
44
  onEnd: () => {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@envelop/execute-subscription-event",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "@envelop/core": "^3.0.0",
6
+ "@envelop/core": "^3.0.1",
7
7
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
8
8
  },
9
9
  "dependencies": {