{"id":22489767,"url":"https://github.com/driescroons/mikro-orm-graphql-example","last_synced_at":"2025-08-02T22:31:15.998Z","repository":{"id":40046212,"uuid":"286257815","full_name":"driescroons/mikro-orm-graphql-example","owner":"driescroons","description":"A MikroORM (v4) example project for GraphQL made with Typescript using TypeGraphQL","archived":false,"fork":false,"pushed_at":"2023-03-18T11:25:57.000Z","size":182,"stargazers_count":168,"open_issues_count":1,"forks_count":24,"subscribers_count":3,"default_branch":"master","last_synced_at":"2023-11-07T17:22:30.795Z","etag":null,"topics":["graphql","mikro-orm","type-graphql","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/driescroons.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-09T14:53:38.000Z","updated_at":"2023-10-19T08:15:02.000Z","dependencies_parsed_at":"2022-06-26T10:03:49.511Z","dependency_job_id":null,"html_url":"https://github.com/driescroons/mikro-orm-graphql-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driescroons%2Fmikro-orm-graphql-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driescroons%2Fmikro-orm-graphql-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driescroons%2Fmikro-orm-graphql-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/driescroons%2Fmikro-orm-graphql-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/driescroons","download_url":"https://codeload.github.com/driescroons/mikro-orm-graphql-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228500468,"owners_count":17930074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphql","mikro-orm","type-graphql","typescript"],"created_at":"2024-12-06T17:20:38.963Z","updated_at":"2024-12-06T17:23:05.674Z","avatar_url":"https://github.com/driescroons.png","language":"TypeScript","readme":"# mikro-orm-graphql-example\n\nA MikroORM boilerplate for GraphQL made with Typescript using TypeGraphQL\n\n## 📦 Packages\n\n- [MikroORM](https://mikro-orm.io/)\n- [GraphQL](https://graphql.org/)\n- [TypeGraphQL](https://typegraphql.com/)\n- [Typescript](https://www.typescriptlang.org/)\n- [Mocha](https://mochajs.org/)\n\nI've also created a [package](https://github.com/driescroons/graphql-fields-to-relations) (`graphql-fields-to-relations`) that converts the input fields to a list of relation strings. These strings can be passed directly to MikroOrm, in order to load the requested relations.\n\n___\n\n## ✨ Installation\n\n1. Install dependencies via `yarn`\n2. Create your docker containers via `docker-compose up -d`\n3. create .env file based on .env.example\n\n```\nPORT=8080\nPOSTGRES_USER=root\nPOSTGRES_PASSWORD=root\nPOSTGRES_DB=mikro-orm-graphql-data\nNODE_DEV=false\n```\n\n4. Load fixtures `yarn loadFixtures`\n5. Run via `yarn start` or `yarn dev`\n6. GraphQL API is running on  [localhost:8080/graphql](http://localhost:8080/graphql)\n\n___\n\n## ⚡️ Usage\n\n### Running\n\nOnce the server starts, you can access the GraphQL API on [localhost:8080/graphql](http://localhost:8080/graphql).\n\nI've included 4 options to run this application:\n\n#### Run with Node\n\nRun the regular start command\n\n#### Run with ts-node-dev\n\nRun and watch the application in Typescript. Checkout [ts-node-dev](https://www.npmjs.com/package/ts-node-dev)\n\n#### Run with debugger\n\nI've added the launch script for VSCode in the repository. You can start the application by going to the Debug and Run tab and clicking on `Debug Application`\n\n#### Test driven with Mocha Test Explorer\n\n[Mocha Test Explorer](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-mocha-test-adapter) allows you to run and debug your mocha tests from a nice UI within VSCode. Install the extension and get going!\n\n![Mocha Test Explorer example](https://i.imgur.com/5WTSij5.gif)\n\n### Migrations\n\nAfter developing a feature, run the following commands to create a migration from the previous migration schema state:\n\n```\nyarn mikro-orm schema:drop --run\nyarn mikro-orm migration:up\nyarn mikro-orm migration:create\n```\n\n___\n\n## 👤 Author\n\nDries Croons  \nWebsite: [dries.io](http://dries.io)  \nGithub: [driescroons](http://github.com/driescroons)  \nTwitter: [croewens](http://twitter.com/croewens)  \n\n___\n\n## 📢 Shoutouts\n\nSpecial thanks to [Leslie Jobse](https://github.com/ljobse) and [Sebastiaan Viaene](https://github.com/sebastiaanviaene) from Panenco.  \n  \nAt [Panenco](https://github.com/Panenco) we shape, build \u0026 grow digital products from the ground up, with the future in mind.\n\n___\n\n## ⭐️ Support\n\nPlease star the repository if this helped you!\n\n___\n\n## ⛑️ Contribution\n\nWant to help contribute to this repository?\n\n- Something's not working? Got a question? Create an issue!\n- Missing some functionality? Feel free to create a pull request!\n\n___\n\n## 🚧 Todo\n\n- Better error handling\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdriescroons%2Fmikro-orm-graphql-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdriescroons%2Fmikro-orm-graphql-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdriescroons%2Fmikro-orm-graphql-example/lists"}