Skip to content
/ trafello Public template

Apollo GraphQL Express Server starter template based on teleferik 🚡

License

Notifications You must be signed in to change notification settings

faundation/trafello

Repository files navigation

Trafello 🚡

Apollo GraphQL Express Server starter template based on teleferik 🚡

View API Live  •  Report Bug  •  Request Feature

What is Trafello?

Trafello is a GraphQL server starter template based on Apollo GraphQL Express middleware.

Trafello doesn't include any database entegration. For now, you have to do all database integration manually 😢.

Why you should use trafello:

  • When creating a project with Apollo Graphql Server, focus on the features in your project instead of repeating the same processes (e.g. pubsub, mocks, directives etc.) over and over.
  • No longer have to install and configure the libraries (e.g. jest, winston etc.) that you will use in your project.
  • Entire project is wrapped in typescript 🦾. ready to define Typescript type definitions under src/@types
  • Even the mock server you will need in frontend development is ready to use.
  • You can easily deploy to heroku via Deploy to Heroku button.
  • First class docker support via docker-compose

Getting Started

Deploy to Heroku

Do you want to make a quick start and test the graphql api? Lets try Deploy to Heroku button.

Deploy on Heroku

Edit on Codesandbox

You can rapidly start development at codesandbox. Codesandbox running on your browser.

Edit on Codesandbox

Local Development Environment

  1. Clone the repo in your project directory:
    $ git clone https://github.com/Asim-Tahir/trafello.git # via git https
    # or
    $ git clone git@github.com:Asim-Tahir/trafello.git # via git ssh
    # or
    $ gh repo clone Asim-Tahir/trafello # via github cli tool
  2. Install dependencies:
    $ npm i
    $ yarn
  3. Rename .env.example file as .env.
  4. Fill enviroment variable into .env.
  5. Run server:
$ npm run dev
$ yarn dev

Usage

Initially, two resolvers were added as an example.

  • ping

ping query is for check whether the server is working properly. Expected to return pong in response. e.g.

  • randomNumber

randomNumber query is for testing server functionality.. Its return random generated number between in range(default 0 to 100). This range can be defined in parameter as min and max. e.g.

Roadmap

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

About

Apollo GraphQL Express Server starter template based on teleferik 🚡

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published