Forked from: SWAPI GraphQL Wrapper
Install dependencies with
npm/yarn installit will build the project API & client after install
src/ contains both the API and client(conviently located in /client) code, to run the tests for both just run:
npm testA local express server is in ./server, this will serve both the graphql API and the front-end. It can be run with:
npm run build/ npm run build-client # Only if you changed something
npm startThe web page will be opened athttp://localhost:8080/ (or similar; the actual port number will be printed to the console) to explore the API. A GraphiQL instance will be availlable at http://localhost:port/graphql
The assignment text was a bit ambiguous in places, so i decided to fill in some blanks, and have a bit of fun with the project.
- I wasnt sure if it was expected to wrap the graphql SWAPI with another API, this seemed like overkill. I thought it made sense to just fork the graphql SWAPI, add some image fetching logic and a React web page.
- I used imgur as the image source since it is an easy and public API, hopefully there will be some funny images.
- I decided to be a bit lazy and just adjust the existing pipeline of the forked project(browserify & flow)
If i had more time..
- introduce some nicer tooling for the FE like webpack, scss and gatsby
- Typescript instead of flow, and jest instead of mocha
- A bit of fallback logic for some characters that do not have any easy to find memes on imgur(search albums?)
- Add docker image for easy deployment
- Setup travis/circleci
- Add more tests (more component tests, snapshot tests, e2e tests)