Skip to content

Commit 899481c

Browse files
committed
clean up descriptions of imports
1 parent 383e5cf commit 899481c

7 files changed

+20
-21
lines changed

site/graphql-js/APIReference-Errors.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ sublinks: formatError,GraphQLError,locatedError,syntaxError
77
next: /docs/api-reference-execution/
88
---
99

10-
The `graphql/error` module is responsible for creating and formating
11-
GraphQL errors.
10+
The `graphql/error` module is responsible for creating and formatting
11+
GraphQL errors. You can import either from the `graphql/error` module, or from the root `graphql` module. For example:
1212

1313
```js
14-
import { ... } from 'graphql/error'; // ES6
15-
var GraphQLError = require('graphql/error'); // CommonJS
14+
import { GraphQLError } from 'graphql'; // ES6
15+
var { GraphQLError } = require('graphql'); // CommonJS
1616
```
1717

1818
## Overview

site/graphql-js/APIReference-Execution.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ next: /docs/api-reference-language/
88
---
99

1010
The `graphql/execution` module is responsible for the execution phase of
11-
fulfilling a GraphQL request.
11+
fulfilling a GraphQL request. You can import either from the `graphql/execution` module, or from the root `graphql` module. For example:
1212

1313
```js
14-
import { execute } from 'graphql/execution'; // ES6
15-
var GraphQLExecution = require('graphql/execution'); // CommonJS
14+
import { execute } from 'graphql'; // ES6
15+
var { execute } = require('graphql'); // CommonJS
1616
```
1717

1818
## Overview

site/graphql-js/APIReference-GraphQL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ The `graphql` module exports a core subset of GraphQL functionality for creation
1111
of GraphQL type systems and servers.
1212

1313
```js
14-
import { ... } from 'graphql'; // ES6
15-
var GraphQL = require('graphql'); // CommonJS
14+
import { graphql } from 'graphql'; // ES6
15+
var { graphql } = require('graphql'); // CommonJS
1616
```
1717

1818
## Overview

site/graphql-js/APIReference-Language.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ sublinks: BREAK,getLocation,Kind,lex,parse,parseValue,printSource,visit
77
next: /docs/api-reference-type-system/
88
---
99

10-
The `graphql/language` module is responsible for parsing and operating on the
11-
GraphQL language.
10+
The `graphql/language` module is responsible for parsing and operating on the GraphQL language. You can import either from the `graphql/language` module, or from the root `graphql` module. For example:
1211

1312
```js
14-
import { ... } from 'graphql/language'; // ES6
15-
var GraphQLLanguage = require('graphql/language'); // CommonJS
13+
import { Source } from 'graphql'; // ES6
14+
var { Source } = require('graphql'); // CommonJS
1615
```
1716

1817
## Overview

site/graphql-js/APIReference-TypeSystem.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ sublinks: getNamedType,getNullableType,GraphQLBoolean,GraphQLEnumType,GraphQLFlo
77
next: /docs/api-reference-utilities/
88
---
99

10-
The `graphql/type` module is responsible for defining GraphQL types and schema.
10+
The `graphql/type` module is responsible for defining GraphQL types and schema. You can import either from the `graphql/type` module, or from the root `graphql` module. For example:
1111

1212
```js
13-
import { ... } from 'graphql/type'; // ES6
14-
var GraphQLType = require('graphql/type'); // CommonJS
13+
import { GraphQLSchema } from 'graphql'; // ES6
14+
var { GraphQLSchema } = require('graphql'); // CommonJS
1515
```
1616

1717
## Overview

site/graphql-js/APIReference-Utilities.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ next: /docs/api-reference-validation/
88
---
99

1010
The `graphql/utilities` module contains common useful computations to use with
11-
the GraphQL language and type objects.
11+
the GraphQL language and type objects. You can import either from the `graphql/utilities` module, or from the root `graphql` module. For example:
1212

1313
```js
14-
import { ... } from 'graphql/utilities'; // ES6
15-
var GraphQLUtilities = require('graphql/utilities'); // CommonJS
14+
import { introspectionQuery } from 'graphql'; // ES6
15+
var { introspectionQuery } = require('graphql'); // CommonJS
1616
```
1717

1818
## Overview

site/graphql-js/APIReference-Validation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ sublinks: specifiedRules,validate
77
---
88

99
The `graphql/validation` module fulfills the Validation phase of fulfilling a
10-
GraphQL result.
10+
GraphQL result. You can import either from the `graphql/validation` module, or from the root `graphql` module. For example:
1111

1212
```js
1313
import { validate } from 'graphql/validation'; // ES6
14-
var GraphQLValidator = require('graphql/validation'); // CommonJS
14+
var { validate } = require('graphql/validation'); // CommonJS
1515
```
1616

1717
## Overview

0 commit comments

Comments
 (0)