https://github.com/jayvirrathi/node-typeorm-postgresql-graphql-api
GraphQL API with Node.js, Postgresql, TypeORM
https://github.com/jayvirrathi/node-typeorm-postgresql-graphql-api
express graphql nodejs postgresql typeorm
Last synced: 3 months ago
JSON representation
GraphQL API with Node.js, Postgresql, TypeORM
- Host: GitHub
- URL: https://github.com/jayvirrathi/node-typeorm-postgresql-graphql-api
- Owner: Jayvirrathi
- Created: 2021-02-14T12:12:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-14T12:26:46.000Z (over 5 years ago)
- Last Synced: 2025-11-20T20:26:21.974Z (8 months ago)
- Topics: express, graphql, nodejs, postgresql, typeorm
- Language: TypeScript
- Homepage:
- Size: 78.1 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Graphql API with Node.js, PostgreSQL with TypeORM
> A Basic Node.js project
## Build Setup
```bash
# install dependencies
npm install
# serve at http://localhost:3000/graphql
npm start
```
## Prerequisites
- Nodejs
- Postgresql
**Request:**
```gql
mutation {
createProduct(variables: { name: "IPhone 11 Max", quantity: 25 }) {
quantity
name
id
}
}
mutation {
updateProduct(fields: { name: "IPhone 11 Max", quantity: 45 }, id: 1)
}
query {
products {
id
name
}
}
query {
products {
id
name
quantity
}
}
mutation {
deleteProduct(id: 1)
}
```