- PostgresQL schema -> Postgraphile -> GraphQL API
or:
- PostgresQL schema -> PostgREST -> REST API
or:
- PostgresQL schema -> REST API -> GraphQL -> GraphQLAPI (not implemented)
- Benchmarking along with the tests.
- User management system (through JWT).
- Referral system
- CMS system (??)
- payment system (??)
- Blockchain functions (??)
- Newsletter management (???)
- JWT verify.
- oauth signup/signin
- ref sys
- cms sys
npm i
- Create database.
- Edit .env or .env.development
- Modify schema inside db/createTables.js if needed.
- Create tables:
cd db/
node createTables.js
npm install -g postgraphile
postgraphile -c postgres://postgres:[email protected]:5432/blue -j --watch
# For all CLI options:
# https://www.graphile.org/postgraphile/usage-cli/
# OR:
npm run start
cd utils/
node pubsub.js
# OR:
npm run pubsub
OR use build.sh
# Install and run:
./postgres_docker.sh container_name postgres_password
# Connect to:
psql -h 0.0.0.0 -p 5432 -U postgres
./graphile_docker.sh name_of_container postgres_password database_name port
Edit postgrest.conf, then:
./postgrest_install.sh
./gen_pass.sh
./postgrest postgrest.conf
./docs.sh project_name
mutation {
signup(input: {email: "[email protected]", password: "123456"}) {
clientMutationId
}
}
mutation {
login(input: {email: "[email protected]", password: "123456"}) {
json
}
}
mutation {
validate(input: {tok: "fbd10f39-88cf-4850-b599-8df0b43aa2ac"}) {
clientMutationId
}
}
mutation {
updateUserInfo(input: {mail: "[email protected]", password: "123456", firstname: "First", lastname: "Last", about: "About me"}) {
clientMutationId
}
}
mutation {
deleteUserAccount(input: {mail: "[email protected]", password: "123456"}) {
clientMutationId
}
}
mutation {
requestPasswordReset(input: {email: "[email protected]"}) {
clientMutationId
}
}
mutation {
resetPassword(input: {email: "[email protected]", token: "1644a2aa-ded2-47f3-945c-e79399015dc7", password: "65321"}) {
clientMutationId
}
}
- Create test database and edit appropirate .env file.
- Graphile API and pubsub listener should be running.
- Then:
npm run test
MIT