⚗ Basic template of a NodeJS application with GraphQL
docker run --name mongodb -d -p 27017:27017 mongo
Getting a user by id
query {
user(id: "61fff210196972b7cc1d3789") {
name
email
}
}
Getting a list of users
query {
users {
id
name
email
}
}
Creating a user and returning the user's id
mutation {
createUser(name: "Diogo", email: "[email protected]") {
id
}
}