A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/driescroons/mikro-orm-graphql-example below:

driescroons/mikro-orm-graphql-example: A MikroORM (v4) example project for GraphQL made with Typescript using TypeGraphQL

mikro-orm-graphql-example

A MikroORM boilerplate for GraphQL made with Typescript using TypeGraphQL

I've also created a package (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.

  1. Install dependencies via yarn
  2. Create your docker containers via docker-compose up -d
  3. create .env file based on .env.example
PORT=8080
POSTGRES_USER=root
POSTGRES_PASSWORD=root
POSTGRES_DB=mikro-orm-graphql-data
NODE_DEV=false
  1. Load fixtures yarn loadFixtures
  2. Run via yarn start or yarn dev
  3. GraphQL API is running on localhost:8080/graphql

Once the server starts, you can access the GraphQL API on localhost:8080/graphql.

I've included 4 options to run this application:

Run the regular start command

Run and watch the application in Typescript. Checkout ts-node-dev

I'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

Test driven with Mocha Test Explorer

Mocha Test Explorer allows you to run and debug your mocha tests from a nice UI within VSCode. Install the extension and get going!

After developing a feature, run the following commands to create a migration from the previous migration schema state:

yarn mikro-orm schema:drop --run
yarn mikro-orm migration:up
yarn mikro-orm migration:create

Dries Croons
Website: dries.io
Github: driescroons
Twitter: croewens

Special thanks to Leslie Jobse and Sebastiaan Viaene from Panenco.

At Panenco we shape, build & grow digital products from the ground up, with the future in mind.

Please star the repository if this helped you!

Want to help contribute to this repository?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4