Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

NestJs | GraphQL | Mikro Orm

Example of using NestJs with GraphQL and Mikro ORM

Project setup

$ pnpm install

Compile and run the project

# development
$ pnpm run start

# watch mode
$ pnpm run start:dev

# production mode
$ pnpm run start:prod

Migrations

# create
$ mikro-orm migration:create

# migrate up to the latest version
$ mikro-orm migration:up 

# migrate one step down
$ mikro-orm migration:down 

#clear the database and rerun all migrations
$ mikro-orm migration:fresh   

GraphQL Playground

The playground can be accessed here: http://localhost:3000/graphql

Example of mutation:

mutation AddRecipeMutation {
  addRecipe(
    newRecipeData: {
      ingredients: ["Water", "Salt"]
      title: "My Recipe"
      description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
    }
  ) {
    id
  }
}

Example of query:

query AllRecipesIds {
  recipes {
    id
  }
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages