This is typical eCommerce API builded with GraphQL, Node.js, MongoDB test database already connected
Available instances: 1.Product 2.Order 3.User
Install all dependencies
npm install
Run the server
npm start
mutation {
createUser(email: "[email protected]", password: "jonny12453") {
_id
email
password
orders {
_id
}
}
}
query{
users{
_id
email
password
orders {
_id
}
}
}
query{
user(_id:"5d4b305c112b1f1f13e0eb10"){
_id
email
password
}
}
mutation{
createOrder(
_customerID: "5d4b305c112b1f1f13e0eb10"
){
_id
number
created
status
}
}
query{
user(_id:"5d4b305c112b1f1f13e0eb10"){
_id
email
password
orders{
_id
number
customer {
_id
}
}
}
}