Skip to content

Commit a6ab7e0

Browse files
committed
Updated the examples to use Apollo Server
1 parent 4a6a8b1 commit a6ab7e0

23 files changed

+2536
-1328
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,30 @@
22
# Introduction to GraphQL
33

44
[https://teamtreehouse.com/library/introduction-to-graphql](https://teamtreehouse.com/library/introduction-to-graphql)
5+
6+
## Running the Examples
7+
8+
To run the GraphQL examples provided in this repo, start with installing all of the required dependencies by running the following command:
9+
10+
```
11+
npm install
12+
```
13+
14+
The examples are organized by the course stage and video. For example, to run the example for the 5th video in the 1st stage of the course, run the following command:
15+
16+
17+
```
18+
node s1v5.js
19+
```
20+
21+
Then browse to [http://localhost:3000/](http://localhost:3000/), enter your GraphQL query in the left pane, press the "Play" button (in the middle of the screen), and view your results in the right pane.
22+
23+
![Apollo Server](/images/apollo-server.png)
24+
25+
If you click on the green tab that's pinned to the right edge of the screen, you can view the details for the available GraphQL schema.
26+
27+
![Schema](/images/schema-details.png)
28+
29+
*Note: To run another example, press CTRL+C to stop the server. Then use the `node` command to run your next example.*
30+
31+
For more information about Apollo Server, see the official documentation at [https://www.apollographql.com/docs/apollo-server/](https://www.apollographql.com/docs/apollo-server/).

images/apollo-server.png

451 KB
Loading

images/schema-details.png

546 KB
Loading

launchpad-instances/s1v5.md

Lines changed: 0 additions & 100 deletions
This file was deleted.

launchpad-instances/s2v2.md

Lines changed: 0 additions & 106 deletions
This file was deleted.

launchpad-instances/s2v3.md

Lines changed: 0 additions & 106 deletions
This file was deleted.

0 commit comments

Comments
 (0)