The purpose of this project is to demo how common features required by web apps can be implemented with GraphQL. This includes:
- Querying data
- Mutating / modifying data.
- Paginating through data.
- Authentication.
- File uploads.
- Realtime updates.
- Apollo server for the backend.
- Apollo react for the client.
It also uses React hooks and GraphQL hooks in the client since hooks is what React projects will eventually move towards.
- The blog demonstrates how queries, mutations and pagination wih queries is done.
- The login page of course demonstrates how token authentication. Since this a demo it stores the AUTH cookie in local storage however you could also have it stored as a cookie via HTTP headers with the 'Secure' and 'HttpOnly' directives set.
- The chat page demonstrates the use of subscriptions. Note when you refresh the chat page you loose your chat history since it isn't saved in a database. It works like live chat. You see only what you’ve typed since you started the chat.
- The file upload page demonstrates how file uploads can be handled with GraphQL. For this feature too the backend does not store data but does return a response.
- Clone to disk.
- Run 'npm i && npm start' to install and fire up both client and server from their respective folders.