Skip to content

Cyber-Psilocybin-Institute/nodejs.graphql.basic.template

Repository files navigation

nodejs.graphql.basic.template

⚗ Basic template of a NodeJS application with GraphQL

Run mongoDB docker container

docker run --name mongodb -d -p 27017:27017 mongo

Query examples

Getting a user by id

query {
  user(id: "61fff210196972b7cc1d3789") {
    name
    email
  }
}

Getting a list of users

query {
  users {
    id
    name
    email
  }
}

Mutations examples

Creating a user and returning the user's id

mutation {
  createUser(name: "Diogo", email: "[email protected]") {
    id
  }
}

About

⚗ Basic template of a NodeJS application with GraphQL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published