Link to review: Systems-Development-and-Frameworks/no-js-pls#7 (comment) |
Dirty_thirties is the homework team consisting of
Jenny | Nele | Sarah
This README is created to share and publish our homework for Systems Development & Frameworks.
Deadline | Date |
---|---|
Review due date (optional) | 16.12.2020 - 14:00 |
Final Due date. | 06.01.2021 - 14:00 |
Extended | 10.01.2021 |
⭐ For choosing a scenario and writing installation instructions in README.md
.
⭐ For explaining WHY you have chosen the scenario in the README.md
.
⭐ For not committing sensitive secrets (e.g. API keys) unencrypted to the repository.
⭐ ⭐ Data created in mutations are persisted and your queries and mutations still work as expected.
⭐ ⭐ Your software tests are free of side effects.
⭐ Your database is never left in an invalid state.
⭐ You deny the client to call mutations and queries of your subschema directly.
⭐ For requesting a review and reviewing another team's PR.
All objectives must be implemented according to the instructions.
--->>> Remote GraphQL API
We choosed the architecture of the Remote GraphQL API. There are some reasons for this decision:
- we didn´t want to choose a local Neo4J DB architecture because of the accessibility and workability for all team members
- we thought a local DB could bring some problems with deferred processing of the task by different team members
- With remote GraphQL API´s we have more experiences
- Remote GraphQL API architecture has some advantages:
- Increase in performance: the number of requests required and the amount of data transferred can be reduced. This is a great advantage for the mobile sector.
- The client can request several resources at the same time and receives all the necessary data with just one request.
- There is only one end point. The client decides which data is required and only receives this.
- remote availability instead of local architecture
- and to be honest: it was introduced to be the easier option
Eventhough Neo4J has many advantages aswell, just one of our 3 team members has experiences with Neo4J. So we decided democratically against the local Neo4J DB for the Remote GraphQL API archticture.
To install the dependencies via npm:
$ npm install
Run Linter
$ npm run lint
Test Linter
$ npm run test
Run Backend
$ npm run dev
- Create an account on GraphCMS
- Create a
Post
Model and add the the fields- Add a Field of Type
Single Line Text
- Add
Title
as Display Name - Check
Use as Title field
- Make the filed
Required
- Add
- Add a Field of Type
Refernce
:- Reference to Person Model (Will be added laters)
- Add a Field of Type
Refernce
:- Reference to Vote Model (Will be added laters)
- Add a Field of Type
- Create a
Person
Model and add the fields- Add a Field of Type
Single Line Text
- Add
Name
as Display Name - Check
Use as Title field
- Make the filed
Required
- Add
- Add a Field of Type
Single Line Text
- Add
Email
as Display Name - Check
Use as Title field
- Make the filed
Required
- Set field as
unique
- Check
Match a specific pattern
and choose Email whith FlagCase insensitive
- Add
- Add a Field of Type
Single Line Text
- Add
Password
as Display Name - Make the filed
Required
- Add
- Add a Field of Type
Refernce
:- Reference to Vote Model Person Model (Will be added laters)
- Create a
Vote
Model and add the fields - Add a Field of Type
Number
- Add
Value
as Display Name - Make the filed
Required
- Limit input Range between -1 and 1
- Add
- Add a Field of Type
Refernce
:- Reference to
Person
Model - Configure the Relation cardinality between
Votes
andPerson
toMany-to-one
( Check: Allow multipleVotes
perPerson
) - Set the display name in the
Configure refrence
Tab toVoted by
- Set the display name in the
Configure reverse filed
Tab toVotes
- NOTE: The inverse relationship will be atted to the
Person
Model automatically
- Reference to
- Add a Field of Type
Refernce
:- Reference to
Post
Model - Configure the Relation cardinality between
Votes
andPost
toMany-to-one
( Check: Allow multipleVotes
perPost
) - Set the display name in the
Configure refrence
Tab toPost
- Set the display name in the
Configure reverse filed
Tab toVotes
- NOTE: The inverse relationship will be atted to the
Person
Model automatically
- Reference to
- Add a Field of Type