Skip to content

Commit

Permalink
Fix Githunt URL (apollographql#3207)
Browse files Browse the repository at this point in the history
* Fixes the GitHunt URL on fragments doc.

* Fixes the GitHunt URL on server-side-rendering doc.

* Updates the authors file with name and e-mail.
  • Loading branch information
thulioph authored and James Baxley committed Mar 24, 2018
1 parent 942f84d commit b8558b7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/source/advanced/fragments.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ export const COMMENT_QUERY = gql`
`;
```

You can see the full source code to the `CommentsPage` in GitHunt [here](https://github.com/apollographql/GitHunt-React/blob/master/ui/routes/CommentsPage.js).
You can see the full source code to the `CommentsPage` in GitHunt [here](https://github.com/apollographql/GitHunt-React/blob/master/src/routes/CommentsPage.js).

<h2 id="colocating-fragments">Colocating fragments</h2>

A key advantage of GraphQL is the tree-like nature of the response data, which in many cases mirrors your rendered component hierarchy. This, combined with GraphQL's support for fragments, allows you to split your queries up in such a way that the various fields fetched by the queries are located right alongside the code that uses the field.

Although this technique doesn't always make sense (for instance it's not always the case that the GraphQL schema is driven by the UI requirements), when it does, it's possible to use some patterns in Apollo client to take full advantage of it.

In GitHunt, we show an example of this on the [`FeedPage`](https://github.com/apollographql/GitHunt-React/blob/master/ui/routes/FeedPage.js), which constructs the follow view hierarchy:
In GitHunt, we show an example of this on the [`FeedPage`](https://github.com/apollographql/GitHunt-React/blob/master/src/routes/FeedPage.js), which constructs the follow view hierarchy:

```
FeedPage
Expand Down
2 changes: 1 addition & 1 deletion docs/source/features/server-side-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export default routes;

```

You can check out the [GitHunt app's `ui/server.js`](https://github.com/apollographql/GitHunt-React/blob/master/ui/server.js) for a complete working example.
You can check out the [GitHunt app's `src/server.js`](https://github.com/apollographql/GitHunt-React/blob/master/src/server.js) for a complete working example.

Next we'll see what that rendering code actually does.

Expand Down
3 changes: 2 additions & 1 deletion packages/apollo-client/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,5 @@ Greg Bergé <[email protected]>
Dotan Simha <[email protected]>
Torsten Blindert <[email protected]>
James Burgess <[email protected]>
Kevin Maschtaler <[email protected]>
Kevin Maschtaler <[email protected]>
Thulio Philipe <[email protected]>

0 comments on commit b8558b7

Please sign in to comment.