Skip to content

Commit e67f2e5

Browse files
Using direct imports in test files (#2060)
1 parent 5c9946b commit e67f2e5

File tree

60 files changed

+264
-233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+264
-233
lines changed

src/__tests__/starWarsSchema.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// @flow strict
22

3+
import { GraphQLSchema } from '../type/schema';
4+
import { GraphQLString } from '../type/scalars';
35
import {
6+
GraphQLList,
7+
GraphQLNonNull,
48
GraphQLEnumType,
59
GraphQLInterfaceType,
610
GraphQLObjectType,
7-
GraphQLList,
8-
GraphQLNonNull,
9-
GraphQLSchema,
10-
GraphQLString,
11-
} from '../type';
11+
} from '../type/definition';
1212

1313
import { getFriends, getHero, getHuman, getDroid } from './starWarsData';
1414

src/error/__tests__/GraphQLError-test.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ import { describe, it } from 'mocha';
66
import dedent from '../../jsutils/dedent';
77
import invariant from '../../jsutils/invariant';
88

9-
import {
10-
Kind,
11-
parse,
12-
Source,
13-
GraphQLError,
14-
printError,
15-
formatError,
16-
} from '../../';
9+
import { Kind } from '../../language/kinds';
10+
import { parse } from '../../language/parser';
11+
import { Source } from '../../language/source';
12+
13+
import { formatError } from '../formatError';
14+
import { GraphQLError, printError } from '../GraphQLError';
1715

1816
const source = new Source(dedent`
1917
{

src/execution/__tests__/abstract-promise-test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
import { expect } from 'chai';
44
import { describe, it } from 'mocha';
55

6+
import { GraphQLSchema } from '../../type/schema';
7+
import { GraphQLString, GraphQLBoolean } from '../../type/scalars';
68
import {
7-
graphql,
8-
GraphQLSchema,
9+
GraphQLList,
910
GraphQLObjectType,
1011
GraphQLInterfaceType,
1112
GraphQLUnionType,
12-
GraphQLList,
13-
GraphQLString,
14-
GraphQLBoolean,
15-
} from '../../';
13+
} from '../../type/definition';
14+
15+
import { graphql } from '../../graphql';
1616

1717
class Dog {
1818
name: string;

src/execution/__tests__/abstract-test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
import { expect } from 'chai';
44
import { describe, it } from 'mocha';
55

6+
import { GraphQLSchema } from '../../type/schema';
7+
import { GraphQLString, GraphQLBoolean } from '../../type/scalars';
68
import {
7-
graphqlSync,
8-
GraphQLSchema,
9+
GraphQLList,
910
GraphQLObjectType,
1011
GraphQLInterfaceType,
1112
GraphQLUnionType,
12-
GraphQLList,
13-
GraphQLString,
14-
GraphQLBoolean,
15-
} from '../../';
13+
} from '../../type/definition';
14+
15+
import { graphqlSync } from '../../graphql';
1616

1717
class Dog {
1818
name: string;

src/execution/__tests__/directives-test.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
import { expect } from 'chai';
44
import { describe, it } from 'mocha';
55

6-
import { parse } from '../../language';
7-
import { GraphQLSchema, GraphQLObjectType, GraphQLString } from '../../type';
6+
import { parse } from '../../language/parser';
7+
8+
import { GraphQLSchema } from '../../type/schema';
9+
import { GraphQLString } from '../../type/scalars';
10+
import { GraphQLObjectType } from '../../type/definition';
811

912
import { execute } from '../execute';
1013

src/execution/__tests__/executor-test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ import { describe, it } from 'mocha';
66
import inspect from '../../jsutils/inspect';
77
import invariant from '../../jsutils/invariant';
88

9-
import { Kind, parse } from '../../language';
9+
import { Kind } from '../../language/kinds';
10+
import { parse } from '../../language/parser';
11+
12+
import { GraphQLSchema } from '../../type/schema';
13+
import { GraphQLInt, GraphQLBoolean, GraphQLString } from '../../type/scalars';
1014
import {
11-
GraphQLSchema,
12-
GraphQLInterfaceType,
13-
GraphQLObjectType,
1415
GraphQLList,
15-
GraphQLBoolean,
16-
GraphQLInt,
17-
GraphQLString,
1816
GraphQLNonNull,
19-
} from '../../type';
17+
GraphQLInterfaceType,
18+
GraphQLObjectType,
19+
} from '../../type/definition';
2020

2121
import { execute } from '../execute';
2222

src/execution/__tests__/lists-test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
import { expect } from 'chai';
44
import { describe, it } from 'mocha';
55

6-
import { parse } from '../../language';
6+
import { parse } from '../../language/parser';
7+
8+
import { GraphQLSchema } from '../../type/schema';
9+
import { GraphQLString, GraphQLInt } from '../../type/scalars';
710
import {
8-
GraphQLSchema,
9-
GraphQLObjectType,
10-
GraphQLString,
11-
GraphQLInt,
1211
GraphQLList,
1312
GraphQLNonNull,
14-
} from '../../type';
13+
GraphQLObjectType,
14+
} from '../../type/definition';
1515

1616
import { execute } from '../execute';
1717

src/execution/__tests__/mutations-test.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
import { expect } from 'chai';
44
import { describe, it } from 'mocha';
55

6-
import { parse } from '../../language';
7-
import { GraphQLSchema, GraphQLObjectType, GraphQLInt } from '../../type';
6+
import { parse } from '../../language/parser';
7+
8+
import { GraphQLInt } from '../../type/scalars';
9+
import { GraphQLSchema } from '../../type/schema';
10+
import { GraphQLObjectType } from '../../type/definition';
811

912
import { execute } from '../execute';
1013

src/execution/__tests__/nonnull-test.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
import { expect } from 'chai';
44
import { describe, it } from 'mocha';
55

6-
import { parse } from '../../language';
7-
import {
8-
GraphQLSchema,
9-
GraphQLObjectType,
10-
GraphQLString,
11-
GraphQLNonNull,
12-
} from '../../type';
6+
import { parse } from '../../language/parser';
7+
8+
import { GraphQLSchema } from '../../type/schema';
9+
import { GraphQLString } from '../../type/scalars';
10+
import { GraphQLNonNull, GraphQLObjectType } from '../../type/definition';
11+
1312
import { buildSchema } from '../../utilities/buildASTSchema';
1413

1514
import { execute } from '../execute';

src/execution/__tests__/resolve-test.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
import { expect } from 'chai';
44
import { describe, it } from 'mocha';
55

6-
import {
7-
graphqlSync,
8-
GraphQLSchema,
9-
GraphQLObjectType,
10-
GraphQLString,
11-
GraphQLInt,
12-
} from '../../';
6+
import { GraphQLSchema } from '../../type/schema';
7+
import { GraphQLObjectType } from '../../type/definition';
8+
import { GraphQLInt, GraphQLString } from '../../type/scalars';
9+
10+
import { graphqlSync } from '../../graphql';
1311

1412
describe('Execute: resolve function', () => {
1513
function testSchema(testField) {

0 commit comments

Comments
 (0)