Clothing Store is an open-source GraphQL API that can handle user registrations, payments, orders. I built this API using Node.js, TypeGraphQL, TypeORM. You can access it here (you are not going to see anything fancy it is just an API but you can send some requests as shown in the GraphQL API section down below): https://clothing-store-app.herokuapp.com/
- Client Repository: https://github.com/emreturgutce/clothing-store-client
If using docker you need to create a .env.docker file and fill it with values as specified in the .env.example file.
If not using docker you need to have postgres and redis running in your system. After that you need to create a .env file and fill it with values as specified in the .env.example file.
git clone https://github.com/emreturgutce/clothing-store.git
docker-compose up
yarn start:dev
// Or
npm run start:dev
POST /graphql
curl \
-i \
-X POST \
-H "Content-Type: application/json" \
-d '{ \"query\": \"{ hello }\"}' \
https://clothing-store-app.herokuapp.com/graphql
HTTP/1.1 200 OK
Date: Tue, 17 Nov 2020 14:03:40 GMT
Status: 200 OK
Connection: keep-alive
Content-Type: application/json
Content-Length: 387
{
"data": {
"hello": "hello world"
}
}
POST /graphql
curl \
-i \
-X POST \
-H "Content-Type: application/json" \
-d '{ \"query\": \"mutation registerUser($data: RegisterInput)
register(data: $data) {
id
email
}
\",
\"variables\": {
\"data\": {
\"email\": \"test123@mail.com\",
\"password\": \"123456\"
}
}
}' \
https://clothing-store-app.herokuapp.com/graphql
HTTP/1.1 200 OK
Date: Tue, 17 Nov 2020 14:03:40 GMT
Status: 200 OK
Connection: keep-alive
Content-Type: application/json
Content-Length: 437
{
"data": {
"register": {
"id": "bb329677-24a0-4157-b2af-ae47efca7dc3",
"email": "test123@mail.com"
}
}
}