Skip to content

Commit

Permalink
fix image paths and README instructions (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
META-DREAMER authored and helfer committed Sep 6, 2016
1 parent b628e70 commit ae3e19a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ To run:
```
git submodule init
git submodule update
cd code && npm install
cd ..
npm install
npm start
```
```
6 changes: 3 additions & 3 deletions docs/source/devtools.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you don't pass in an existing Redux Store into the `ApolloClient` constructor

To get started with Redux DevTools, click the DevTools icon in your chrome browser. You will now see the Redux logger.

![DevTools](../assets/devtools/devtools.png)
![DevTools](./assets/devtools/devtools.png)

### Features

Expand Down Expand Up @@ -51,7 +51,7 @@ When a query is sent to your GraphQL server, Apollo dispatches an action to the
Taking a closer look at the metadata that comes with a `APOLLO_QUERY_INIT` action, we see that `APOLLO_QUERY_INIT` sends over `queryId`, `queryString`, and `query`. The action takes these pieces of metadata and adds it to the Redux store. These properties can now be found saved in Redux.
The beauty of these state changes is the management for data "readyness". When the Store dispatches `APOLLO_QUERY_INIT`, the particular query we are trying to resolve will have this structure:

![QUERY_INIT_DATA](../assets/devtools/query-init-data.png)
![QUERY_INIT_DATA](./assets/devtools/query-init-data.png)

* The keys `loading` to manage our data "readyness",
* `networkError` and `graphQLErrors` to have complete visibility of errors to the end user.
Expand Down Expand Up @@ -106,7 +106,7 @@ Here we can see the `selection set` of our mutation and the variables used in th

When a mutation has been resolved, the Store dispatches `APOLLO_MUTATION_RESULT`.

![MUTATION_RESULT](../assets/devtools/mutation-result.png)
![MUTATION_RESULT](./assets/devtools/mutation-result.png)

* The keys `loading` to manage our mutation "readyness"
* `error` to have complete visibility of errors to the end user.
Expand Down
8 changes: 4 additions & 4 deletions docs/source/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ The current diagrams are aspirational - the code doesn't always reflect this str

Here's a high level overview of the data flow in Apollo Client:

![Overview](../assets/client-diagrams/1-overview.png)
![Overview](./assets/client-diagrams/1-overview.png)

The client is split into two main flows, which we will explain in more detail below:

![Map](../assets/client-diagrams/2-map.png)
![Map](./assets/client-diagrams/2-map.png)

<h2 id="minimize">Minimization</h2>

In this flow, queries arrive from UI components and are processed before being sent to the server.

![Minimize](../assets/client-diagrams/3-minimize.png)
![Minimize](./assets/client-diagrams/3-minimize.png)

<h2 id="normalize">Normalization</h2>

In this flow, query results arrive from the server, and are saved to the store in normalized form. The query shape is then reconstructed before passing the results to any UI components affected by the new state.

![Normalize](../assets/client-diagrams/4-normalize.png)
![Normalize](./assets/client-diagrams/4-normalize.png)

It's easiest to see what happens with an example. Let's say we send the following query to the server:

Expand Down

0 comments on commit ae3e19a

Please sign in to comment.