Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit dcce97e

Browse files
committed
docs(cookbook/graphql): @kapunahelewong review of review fixes
1 parent f6d214c commit dcce97e

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

public/docs/ts/latest/cookbook/graphql.jade

+6-8
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,9 @@ a#http-heroes
219219
The full documentation can be found on the [Apollo Client docs website](http://dev.apollodata.com/).
220220

221221
:marked
222-
The starting point for the app would be the Tour Of Heroes tutorial app at it's end state.
223-
You can download that app [here](https://github.com/johnpapa/angular2-tour-of-heroes/archive/master.zip).
224-
225-
You will gradually migrate that app from using REST to using GraphQL.
222+
The starting point for the app is the [Tour of Heroes tutorial](https://github.com/johnpapa/angular2-tour-of-heroes/archive/master.zip) app at its end state.
226223

224+
This guide shows you how to migrate that app from REST to GraphQL.
227225

228226
.l-main-section
229227
<a id="installation"></a>
@@ -470,8 +468,8 @@ code-example(language="sh" class="code-shell").
470468

471469
+makeExample('heroes-graphql/ts/src/app/in-memory-graphql.ts', 'graphql-schema', 'in-memory-graphql.ts')
472470
:marked
473-
The schema starts with a representions of the model of data the server exposes.
474-
Then the schema specifies what queries are allowed on that data, followed by specifing
471+
The schema starts with a represention of the model of data the server exposes.
472+
Then the schema specifies what queries are allowed on that data, followed by specifying
475473
what mutations (actions) clients are allowed to do on the server.
476474
The end of the schema provides the above definitions as the root types the GrpahQL server will expose.
477475

@@ -538,15 +536,15 @@ code-example(language="sh" class="code-shell").
538536
:marked
539537
Now create a new `networkInterface` class and call it `InBrowserNetworkInterface`.
540538

541-
This class will have a `schema` property which it will initialize in the constructor.
539+
This class has a `schema` property which it will initializes in the constructor.
542540

543541
Next, the `query` function takes as an argument the query request and executes
544542
that query using the GraphQL `execute` function against the schema property.
545543

546544
You send empty objects to the `rootValue` and `contextValue` arguments of the function with `{}` and `{}` respectively
547545
and send the `variables` and `operationName` arguments that are related to the query request.
548546

549-
Lastly export the new `InBrowserNetworkInterface` class in order to import it to Apollo Client.
547+
Lastly, export the new `InBrowserNetworkInterface` class in order to import it to Apollo Client.
550548
+makeExample('heroes-graphql/ts/src/app/in-memory-graphql.ts', 'execute-and-export', 'in-memory-graphql.ts (excerpt)')
551549
:marked
552550
Now all that's left is to connect the new in-memory server to the Apollo Client configuration

0 commit comments

Comments
 (0)