Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,3 @@ typings/

# dotenv environment variables file
.env

17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# FunFunFuction GraphQL Goodreads
This is the source code for implementing GraphQL from scratch, wrapping the GoodReads API in GraphQL, using node.js, express, express-graphql in JavaScript. This code is based on Fun Fun Function YOutube channel's video that you can access [in this following link](https://www.youtube.com/watch?v=lAJWHHUz8_8).

## Prerequisites
- [NodeJS and NPM](https://nodejs.org/en/)

## Youtube Video
[Please follow this link](https://www.youtube.com/watch?v=lAJWHHUz8_8)

## Getting started
Start server usign the following command
```
node server.js
```

And then open the browser an access `htpp://localhost:4000`, follow the instructions in the video.

22 changes: 22 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"express": "^4.15.4",
"express-graphql": "^0.6.11",
"graphql": "^0.11.3",
"node-fetch": "^1.7.3",
"xml2js": "^0.4.19"
}
}
2 changes: 1 addition & 1 deletion serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const util = require('util')
const parseXML = util.promisify(require('xml2js').parseString)

const fetchAuthor = id =>
fetch(`https://www.goodreads.com/author/show.xml?id=${id}&key=Rz607gLuIzr1a55wEbl3w `)
fetch(`https://www.goodreads.com/author/show.xml?id=${id}&key=Rz607gLuIzr1a55wEbl3w`)
.then(response => response.text())
.then(parseXML)

Expand Down