cp .env.example .env
# fill `.env` with your `MONGODB_URI`
npm install
npm run start:dev
mutation CreateProduct($input: NewProductInput!) {
product: createProduct(createProductData: $input) {
_id
name
price
createdAt
updatedAt
active
}
}
{
"input": {
"name": "New Product",
"price": 100
}
}
query{
getProduct(id: "<OBJECT_ID>") {
_id
name
price
createdAt
updatedAt
active
}
}