Skip to content

Commit

Permalink
feat: use custom executor (#1966)
Browse files Browse the repository at this point in the history
  • Loading branch information
saihaj committed Oct 27, 2022
1 parent 5a60aca commit 6e25020
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-pillows-tap.md
@@ -0,0 +1,5 @@
---
'graphql-yoga': minor
---

use custom executor
18 changes: 18 additions & 0 deletions .eslintrc.cjs
Expand Up @@ -48,5 +48,23 @@ module.exports = {
'import/no-default-export': 'off',
},
},
{
files: ['packages/**/*'],
rules: {
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'graphql',
importNames: ['execute', 'subscribe'],
message:
'Please use `execute` and `subscribe` from `@graphql-tools/executor` instead.',
},
],
},
],
},
},
],
}
Expand Up @@ -10,7 +10,6 @@ import { createYoga, Plugin, Repeater } from 'graphql-yoga'
import { Push } from '@repeaterjs/repeater'
import { createServer, Server } from 'http'
import { createFetch, fetch, File, FormData } from '@whatwg-node/fetch'
import { createGraphQLError } from '@graphql-tools/utils'
import { AddressInfo } from 'net'

describe('incremental delivery', () => {
Expand Down
1 change: 1 addition & 0 deletions packages/graphql-yoga/package.json
Expand Up @@ -51,6 +51,7 @@
"@envelop/core": "3.0.2",
"@envelop/parser-cache": "5.0.2",
"@envelop/validation-cache": "5.0.2",
"@graphql-tools/executor": "^0.0.1",
"@graphql-tools/schema": "^9.0.0",
"@graphql-typed-document-node/core": "^3.1.1",
"@graphql-yoga/subscription": "^3.0.0-next.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/graphql-yoga/src/server.ts
@@ -1,12 +1,11 @@
import {
print,
ExecutionResult,
execute,
parse,
validate,
subscribe,
specifiedRules,
} from 'graphql'
import { execute, subscribe } from '@graphql-tools/executor'
import {
GetEnvelopedFn,
envelop,
Expand Down
21 changes: 21 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6e25020

Please sign in to comment.