Skip to content

๐Ÿ›  A starter GraphQL server using TypeGraphQL's and PostgreSQL, implementing Node's fractal pattern

License

Notifications You must be signed in to change notification settings

rodzy/graphql-apollo-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

32 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GraphQL + Apollo Starter ๐Ÿ› 

Get an GraphQL server using TypeGraphQL and PostgreSQL up and running in seconds.

Installation ๐Ÿš€

Pre-requisites

  1. Yarn v.1.22.4+.

  2. PostgreSQL v.12.

Steps โœ…

  1. Clone this repository.

  2. Run yarn install on your terminal to get all the dependencies.

  3. Get your PostgreSQL services up and running.

  4. Check the ormconfig.json file:

    {
  "name": "default",
  "type": "postgres",
  "host": "localhost",
  "port": 5432,
  "username": "<your-username>",
  "password": "<your-password>",
  "database": "<your-database-name>",
  "synchronize": true,
  "logging": true,
  "entities": ["src/entity/*.*"]
}
  • Keep in mind:
    • Change the values in <>.
    • If you want to experiment and use another database, I would suggest checking TypeORM Documentation, and switching some configs out.
  1. Run the development server using: yarn start.

  2. Apollo server must be listening on: http://localhost:4000/graphql.

  3. Everything is setup so far, happy coding ๐Ÿ˜‰.

Why fractal design โœจ

  1. Gives us phenomenal scale.

  2. Easy to debug as everything go with the domain logic flow.

  3. Easy to onboard a new developer to this codebase.

Read more here: Structure your Node js Apps

License

MIT

About

๐Ÿ›  A starter GraphQL server using TypeGraphQL's and PostgreSQL, implementing Node's fractal pattern

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published