Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
This project is a demo backend assessment for Memorable Memorable is linked at here
- Asset Creation
- Highly Customizable Asset Query
- Asset Update
- Retrieve Average Metric Data for Field
The project was built natively with the following technologies
To build the project locally, simply clone the github repository. Navigate to root project folder and run the following to install packages:
# Install packages
$ npm install
After packages have been installed. Proceed to run:
npm start
***Base API: http://localhost:3000/graphql
'http://localhost:3000/graphql' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: http://localhost:3000' --data-binary '{"query":"mutation {\n createAsset(\n asset: { filename: \"file0001\", asset_type: \"image\", extension: \"png\" }\n ) {\n id\n filename\n asset_type\n extension\n time_added\n score_type1\n score_type2\n score_type3\n }\n}\n"}' --compressed
'http://localhost:3000/graphql' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: http://localhost:3000' --data-binary '{"query":"# Write your query or mutation here\nquery {\n asset(id:\"f90ae0ee-7ca4-4668-b6da-3e48f6840720\"){\n filename\n score_type1\n score_type2\n}\n}"}' --compressed
'http://localhost:3000/graphql' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: http://localhost:3000' --data-binary '{"query":"mutation {\n addScores(\n id: \"ca9346f2-8a86-428f-8fac-a6dc17b08c0d\"\n scores: { score_type1: 20, score_type2: 99, score_type3: 23 }\n ) {\n id\n score_type1\n score_type2\n score_type3\n filename\n extension\n }\n}\n"}' --compressed
'http://localhost:3000/graphql' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: http://localhost:3000' --data-binary '{"query":"query {\n getAverage(asset_type: \"image\", score_type: \"Type1\") {\n average_score\n }\n}\n"}' --compressed
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
.
This project is GNU-V3.