Skip to content

Commit 34f5c76

Browse files
committed
refactor(execution): add separate entrypoints file (#4527)
cleans up our long execute file (a bit) it's potentially a breaking change if these entrypoints were being imported directly; we will clean that up later by renaming execute.ts to something else and renaming entrypoints.ts to execute.ts, but removing the entrypoints first will hopefully allow us to preserve more history.
1 parent 82b27ae commit 34f5c76

24 files changed

Lines changed: 402 additions & 374 deletions

benchmark/introspectionFromSchema-benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { executeSync } from 'graphql/execution/execute.js';
1+
import { executeSync } from 'graphql/execution/entrypoints.js';
22
import { parse } from 'graphql/language/parser.js';
33
import { buildSchema } from 'graphql/utilities/buildASTSchema.js';
44
import { getIntrospectionQuery } from 'graphql/utilities/getIntrospectionQuery.js';

benchmark/list-async-benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { execute } from 'graphql/execution/execute.js';
1+
import { execute } from 'graphql/execution/entrypoints.js';
22
import { parse } from 'graphql/language/parser.js';
33
import { buildSchema } from 'graphql/utilities/buildASTSchema.js';
44

benchmark/list-asyncIterable-benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { execute } from 'graphql/execution/execute.js';
1+
import { execute } from 'graphql/execution/entrypoints.js';
22
import { parse } from 'graphql/language/parser.js';
33
import { buildSchema } from 'graphql/utilities/buildASTSchema.js';
44

benchmark/list-sync-benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { execute } from 'graphql/execution/execute.js';
1+
import { execute } from 'graphql/execution/entrypoints.js';
22
import { parse } from 'graphql/language/parser.js';
33
import { buildSchema } from 'graphql/utilities/buildASTSchema.js';
44

src/execution/__tests__/abstract-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { GraphQLSchema } from '../../type/schema.js';
1717

1818
import { buildSchema } from '../../utilities/buildASTSchema.js';
1919

20-
import { execute, executeSync } from '../execute.js';
20+
import { execute, executeSync } from '../entrypoints.js';
2121

2222
interface Context {
2323
async: boolean;

src/execution/__tests__/cancellation-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { parse } from '../../language/parser.js';
1111

1212
import { buildSchema } from '../../utilities/buildASTSchema.js';
1313

14-
import { execute, subscribe } from '../execute.js';
14+
import { execute, subscribe } from '../entrypoints.js';
1515

1616
const schema = buildSchema(`
1717
type Todo {

src/execution/__tests__/directives-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { GraphQLObjectType } from '../../type/definition.js';
77
import { GraphQLString } from '../../type/scalars.js';
88
import { GraphQLSchema } from '../../type/schema.js';
99

10-
import { executeSync } from '../execute.js';
10+
import { executeSync } from '../entrypoints.js';
1111

1212
const schema = new GraphQLSchema({
1313
query: new GraphQLObjectType({

src/execution/__tests__/errorPropagation-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { parse } from '../../language/parser.js';
88

99
import { buildSchema } from '../../utilities/buildASTSchema.js';
1010

11+
import { execute } from '../entrypoints.js';
1112
import type { ExecutionResult } from '../execute.js';
12-
import { execute } from '../execute.js';
1313

1414
const syncError = new Error('bar');
1515

src/execution/__tests__/executor-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525
} from '../../type/scalars.js';
2626
import { GraphQLSchema } from '../../type/schema.js';
2727

28-
import { execute, executeSync } from '../execute.js';
28+
import { execute, executeSync } from '../entrypoints.js';
2929

3030
describe('Execute: Handles basic execution tasks', () => {
3131
it('executes arbitrary code', async () => {

src/execution/__tests__/lists-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import { GraphQLSchema } from '../../type/schema.js';
1818

1919
import { buildSchema } from '../../utilities/buildASTSchema.js';
2020

21+
import { execute, executeSync } from '../entrypoints.js';
2122
import type { ExecutionResult } from '../execute.js';
22-
import { execute, executeSync } from '../execute.js';
2323

2424
describe('Execute: Accepts any iterable as list value', () => {
2525
function complete(rootValue: unknown) {

0 commit comments

Comments
 (0)