This project was bootstrapped with Create React App.
This project is the backend core of the app. It is an apollo-server that is returning back graphql queries.
cd resolveBackend
npm install
npm run compile-gql-types
npm start
open http://localhost:4000/
You can preview the server response via the graphql interface
screenCapture720-backend.mov
screenCapture720-frontend.mov
- I thought that downloading and parsing the database would result in more overhead than it did. The graphql apollo client for the web-client has mechanisms in place to handle long loads for long duration queries. This turned out to be a non-issue but this demo could support larger downloads and delays between responses due to the "loading" state
- I'm code generating all the types from the structure (of which the data is easily structured and rationalized via the graphql queries) -- this allows for auto complete on both the server and the client when it comes to the data model.
- The apollo server is letting me just have an async function and handling all the state management of the query for me. The extra overhead of doing it in graphql was worth it for this abstraction.
- The apollo client auto caches queries as per one of the line items in the nice to haves ;). Also there's the possibility to add caching to the backend as well if it was to be extended / if we talk about it.
(make sure backend is running)
cd resolve-frontend
npm install
npm run compile-gql-types
npm start
(browser should auto launch to the site) localhost:3000
hit the fetch button or enter another entity id to fetch a different entity.
Only the backend has testing
cd resolveBackend
npm run test