Skip to content

Commit

Permalink
missed doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
enisdenjo committed Oct 13, 2022
1 parent a523329 commit 7c9c65d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/plugins/extended-validation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { useExtendedValidation } from '@envelop/extended-validation'

const getEnveloped = envelop({
plugins: [
useEngine({ parse, validate, execute, subscribe }),
useEngine({ parse, validate, specifiedRules, execute, subscribe }),
useExtendedValidation({
rules: [
/* ... your rules here */
Expand Down Expand Up @@ -62,13 +62,13 @@ You can use union inputs either via a the SDL flow, by annotating types and fiel
First, make sure to add that rule to your plugin usage:

```ts
import { parse, validate, execute, subscribe } from 'graphql'
import { parse, validate, specifiedRules, execute, subscribe } from 'graphql'
import { envelop, useEngine } from '@envelop/core'
import { useExtendedValidation, OneOfInputObjectsRule } from '@envelop/extended-validation'

const getEnveloped = envelop({
plugins: [
useEngine({ parse, validate, execute, subscribe }),
useEngine({ parse, validate, specifiedRules, execute, subscribe }),
useExtendedValidation({
rules: [OneOfInputObjectsRule]
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,13 @@ const getEnveloped = envelop({
Don't want to automatically invalidate based on mutations? Also configurable!

```ts
import { parse, validate, execute, subscribe } from 'graphql'
import { parse, validate, specifiedRules, execute, subscribe } from 'graphql'
import { envelop, useEngine } from '@envelop/core'
import { useResponseCache } from '@envelop/response-cache'

const getEnveloped = envelop({
plugins: [
useEngine({ parse, validate, execute, subscribe }),
useEngine({ parse, validate, specifiedRules, execute, subscribe }),
// ... other plugins ...
useResponseCache({
// some might prefer invalidating only based on a database write log
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/v3/guides/migrating-from-v2-to-v3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ We have designed the new `envelop` to be engine agnostic. This means that `graph
We decided to drop `onResolverCalled` hook and instead [provide a new plugin](https://github.com/n1ru4l/envelop/pull/1500) that will let you hook into this phase.

```diff
import { parse, validate, execute, subscribe } from 'graphql'
import { parse, validate, specifiedRules,execute, subscribe } from 'graphql'
import { envelop, Plugin, useEngine } from '@envelop/core'
+ import { useOnResolve } from '@envelop/on-resolve'

Expand All @@ -41,7 +41,7 @@ function useResolve(): Plugin {

const getEnveloped = envelop({
plugins: [
useEngine({ parse, validate, execute, subscribe }),
useEngine({ parse, validate,specifiedRules, execute, subscribe }),
// ... other plugins ...
useResolve(),
],
Expand Down

0 comments on commit 7c9c65d

Please sign in to comment.