Skip to content

Commit a37ce63

Browse files
authored
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 1dc7a08 commit a37ce63

27 files changed

Lines changed: 505 additions & 475 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
@@ -16,7 +16,7 @@ import {
1616
execute,
1717
experimentalExecuteIncrementally,
1818
subscribe,
19-
} from '../execute.js';
19+
} from '../entrypoints.js';
2020
import type {
2121
InitialIncrementalExecutionResult,
2222
SubsequentIncrementalExecutionResult,

src/execution/__tests__/collectFields-test.ts

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

1010
import { collectFields } from '../collectFields.js';
11-
import { validateExecutionArgs } from '../execute.js';
11+
import { validateExecutionArgs } from '../entrypoints.js';
1212

1313
const schema = buildSchema(`
1414
type Query {

src/execution/__tests__/defer-test.ts

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

21-
import { execute, experimentalExecuteIncrementally } from '../execute.js';
21+
import { execute, experimentalExecuteIncrementally } from '../entrypoints.js';
2222
import type {
2323
InitialIncrementalExecutionResult,
2424
SubsequentIncrementalExecutionResult,

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,7 +8,7 @@ import { parse } from '../../language/parser.js';
88

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

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

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

0 commit comments

Comments
 (0)