Application contains graphql server and is integrated with TypeORM. Server is set up to run on port 8050.
- TypeScript (min version 3.x.x)
- NodeJS (min version 12.16.x)
- NPM (min version 6.x.x)
To run the application, first you need to install the packages:
npm install
Then you can run using command:
npm start
- Get all users
query {
users {
id
firstname
lastname
nickname
email
password
}
}
- Get user by id
query {
user(id: "2") {
id
firstname
lastname
nickname
email
password
}
}
- Create user
mutation {
createUser(
data: {
firstname: "Jacek",
lastname: "Papuga",
nickname: "Kapitan Dżak",
email: "[email protected]",
password: "typowehasłodżaka"
}
) {
id
firstname
lastname
nickname
email
password
}
}
- Update user
mutation {
updateUser(
id: "2",
data: {
nickname: "Lunatyk"
}
)
{
id
firstname
lastname
nickname
email
password
}
}
- Delete user
mutation {
deleteUser(id: "3")
}