Skip to content

Commit 11505d7

Browse files
author
rmcteggart-r7
authored
Docs: some language cleanup in readme and API reference (#2680)
* Docs: some language cleanup in readme and API reference * Updates to docs language * Fixing grammar in API reference doc
1 parent 1e1d75e commit 11505d7

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Looking for help? Find resources [from the community](https://graphql.org/commun
1313

1414
## Getting Started
1515

16-
An overview of GraphQL in general is available in the
16+
A general overview of GraphQL is available in the
1717
[README](https://github.com/graphql/graphql-spec/blob/master/README.md) for the
1818
[Specification for GraphQL](https://github.com/graphql/graphql-spec). That overview
1919
describes a simple set of GraphQL examples that exist as [tests](src/__tests__)
@@ -30,16 +30,16 @@ With npm:
3030
npm install --save graphql
3131
```
3232

33-
or alternatively using yarn:
33+
or using yarn:
3434

3535
```sh
3636
yarn add graphql
3737
```
3838

39-
GraphQL.js provides two important capabilities: building a type schema, and
39+
GraphQL.js provides two important capabilities: building a type schema and
4040
serving queries against that type schema.
4141

42-
First, build a GraphQL type schema which maps to your code base.
42+
First, build a GraphQL type schema which maps to your codebase.
4343

4444
```js
4545
import {
@@ -64,10 +64,9 @@ var schema = new GraphQLSchema({
6464
});
6565
```
6666

67-
This defines a simple schema with one type and one field, that resolves
67+
This defines a simple schema, with one type and one field, that resolves
6868
to a fixed value. The `resolve` function can return a value, a promise,
69-
or an array of promises. A more complex example is included in the top
70-
level [tests](src/__tests__) directory.
69+
or an array of promises. A more complex example is included in the top-level [tests](src/__tests__) directory.
7170

7271
Then, serve the result of a query against that type schema.
7372

@@ -102,7 +101,7 @@ graphql(schema, query).then((result) => {
102101
});
103102
```
104103

105-
**Note**: Please don't forget to set `NODE_ENV=production` if you are running a production server it will disable some checks that can be useful during development but will significantly improve performance.
104+
**Note**: Please don't forget to set `NODE_ENV=production` if you are running a production server. It will disable some checks that can be useful during development but will significantly improve performance.
106105

107106
### Want to ride the bleeding edge?
108107

@@ -118,7 +117,7 @@ npm install graphql@git://github.com/graphql/graphql-js.git#npm
118117

119118
### Using in a Browser
120119

121-
GraphQL.js is a general purpose library and can be used both in a Node server
120+
GraphQL.js is a general-purpose library and can be used both in a Node server
122121
and in the browser. As an example, the [GraphiQL](https://github.com/graphql/graphiql/)
123122
tool is built with GraphQL.js!
124123

@@ -130,7 +129,7 @@ custom build configurations look for `.mjs` files!
130129

131130
### Contributing
132131

133-
We actively welcome pull requests, learn how to [contribute](./.github/CONTRIBUTING.md).
132+
We actively welcome pull requests. Learn how to [contribute](./.github/CONTRIBUTING.md).
134133

135134
### Changelog
136135

docs/APIReference-Language.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ export class Source {
106106
```
107107
108108
A representation of source input to GraphQL. The name is optional,
109-
but is mostly useful for clients who store GraphQL documents in
109+
but it is useful for clients who store GraphQL documents in
110110
source files; for example, if the GraphQL input is in a file Foo.graphql,
111-
it might be useful for name to be "Foo.graphql".
111+
it might be useful for `name` to be "Foo.graphql".
112112
113113
### getLocation
114114
@@ -142,13 +142,13 @@ export type Token = {
142142
```
143143
144144
Given a Source object, this returns a Lexer for that source.
145-
A Lexer is a function that acts like a generator in that every time
145+
A Lexer is a function that acts as a generator in that every time
146146
it is called, it returns the next token in the Source. Assuming the
147147
source lexes, the final Token emitted by the lexer will be of kind
148148
EOF, after which the lexer will repeatedly return EOF tokens whenever
149149
called.
150150
151-
The argument to the lexer function is optional, and can be used to
151+
The argument to the lexer function is optional and can be used to
152152
rewind or fast forward the lexer to a new position in the source.
153153
154154
## Parser
@@ -194,7 +194,7 @@ An enum that describes the different kinds of AST nodes.
194194
function visit(root, visitor, keyMap)
195195
```
196196

197-
visit() will walk through an AST using a depth first traversal, calling
197+
visit() will walk through an AST using a depth-first traversal, calling
198198
the visitor's enter function at each node in the traversal, and calling the
199199
leave function after visiting that node and all of its child nodes.
200200

@@ -230,10 +230,10 @@ var editedAST = visit(ast, {
230230
231231
Alternatively to providing enter() and leave() functions, a visitor can
232232
instead provide functions named the same as the kinds of AST nodes, or
233-
enter/leave visitors at a named key, leading to four permutations of
233+
enter/leave visitors at a named key, leading to four permutations of the
234234
visitor API:
235235
236-
1. Named visitors triggered when entering a node a specific kind.
236+
1. Named visitors triggered when entering a node of a specific kind.
237237
238238
```js
239239
visit(ast, {

0 commit comments

Comments
 (0)