NestJS GraphQL with TypeORM and MariaDB (MySQL)
Graphql-Fellowship-of-the-Ring.mp4
Check or change the database name, user and password in .env file
- Create database
- Create database user
- Make changes in .env file
- Run migrate command:
npm run migrate
- To generate migration file, if needed (it is already generated, so this step can be skipped):
npm run migration:gen
npm run seed:run
{
cultures(
options: {
take: 100
skip: 0
sort: { name: ASC }
filter: { name: { search: "Fellowship" } }
}
) {
totalItems
items {
id
name
characters(
options: {
take: 10
skip: 0
sort: { name: ASC }
filter: { name: { search: "Gandalf" } }
}
){
totalItems
items{
id
name
}
}
}
}
}