{"id":13990845,"url":"https://github.com/developer239/localized-graphql-koa-typescript","last_synced_at":"2025-07-22T13:31:47.882Z","repository":{"id":97424509,"uuid":"145549934","full_name":"developer239/localized-graphql-koa-typescript","owner":"developer239","description":"JavaScript meets server. Objection and GraphQL with support for 🌍  multiple languages.   🐳  and 100 % test coverage included.","archived":true,"fork":false,"pushed_at":"2019-03-13T14:17:41.000Z","size":12501,"stargazers_count":12,"open_issues_count":6,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-09T13:17:55.313Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/developer239.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-21T10:42:38.000Z","updated_at":"2023-01-28T17:57:42.000Z","dependencies_parsed_at":"2023-03-04T05:45:44.439Z","dependency_job_id":null,"html_url":"https://github.com/developer239/localized-graphql-koa-typescript","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer239%2Flocalized-graphql-koa-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer239%2Flocalized-graphql-koa-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer239%2Flocalized-graphql-koa-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/developer239%2Flocalized-graphql-koa-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/developer239","download_url":"https://codeload.github.com/developer239/localized-graphql-koa-typescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227099033,"owners_count":17730696,"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":[],"created_at":"2024-08-09T13:03:23.630Z","updated_at":"2024-11-29T10:31:57.778Z","avatar_url":"https://github.com/developer239.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"[![CircleCI](https://circleci.com/gh/developer239/localized-graphql-koa-typescript.svg?style=svg)](https://circleci.com/gh/developer239/localized-graphql-koa-typescript) [![Test Coverage](https://api.codeclimate.com/v1/badges/fbebbe4d9b9503c0b4b6/test_coverage)](https://codeclimate.com/github/developer239/localized-graphql-koa-typescript/test_coverage) [![Maintainability](https://api.codeclimate.com/v1/badges/fbebbe4d9b9503c0b4b6/maintainability)](https://codeclimate.com/github/developer239/localized-graphql-koa-typescript/maintainability) [![Greenkeeper badge](https://badges.greenkeeper.io/developer239/localized-graphql-koa-typescript.svg)](https://greenkeeper.io/)\n\n# Localized GraphQL Koa TypeScript\n\nExample boilerplate for you next GraphQL NodeJs server. Part of the project setup is from [petrhanak/backend-typescript-boilerplate](https://github.com/petrhanak/backend-typescript-boilerplate).\n\n**Demo** \n\nYou can try the application [here](https://localized-graphql-koa-ts.herokuapp.com/playground) (it might take a while before the free server wakes up)\n\n**With Multiple Languages** 🌍\n\nBy default all queries return data in english. If you want to request different translation then you have to send language code in http header:\n\n```\n{\n  \"language\": \"cs\"\n}\n```\n\nIf you are not familiar with docker, I highly recommend using it. You can download [Docker.dmg here](https://download.docker.com/mac/stable/Docker.dmg).\n\nAll you have to do to run the application in development mode is:\n\n1. `docker-compose up -d`\n2. `make db-migrate`\n3. `make db-seed`\n4. Open [http://localhost:3000/playground](http://localhost:3000/playground) in your browser \n\n![1](https://github.com/developer239/localized-graphql-koa-typescript/blob/master/preview.gif?raw=true)\n\n## Docker Users\n\nYou don't have to install node or postgres or any other library. Development environment is inside docker containers. `Makefile` is middleman between docker containers and our virtualized application.\n\n**NOTE:** make sure that `CONTAINER_NAME` in `Makefile` has a correct value.\n\n**Development:**\n\n- `make enter` enter container terminal\n- `make node_modules` reinstall node modules\n- `make db-migrate` apply database migration\n- `make db-rollback` rollback database migration\n- `make db-reset` rollback and migrate\n- `make db-seed` seed database\n- `make dev` start development server\n\n**Test**\n\n- `make test` run tests\n- `make test-coverage` run tests and report coverage\n\n**Production:**\n\n- `make build` build static javascript files\n \n## Without Docker\n \n\nIf for some reason you can't or don't want to use docker then following instruction will guide you through the whole installation process:\n\n**System Dependencies**\n\n- Install node environment: `brew install node`\n- Install yarn package manager: `brew install yarn`\n- Install database `brew install PostgreSQL`\n\n## Commands\n\n**Development:**\n\n- `yarn install` install node modules\n- `yarn db:migrate` apply database migration\n- `yarn db:rollback` rollback database migration\n- `yarn db:reset` rollback and migrate\n- `yarn db:seed` seed database\n- `yarn dev` start development server\n\n**Test**\n\n- `yarn test` run tests\n- `yarn test:coverage` run tests and report coverage\n\n**Production:**\n\n- `yarn build` build static javascript files\n\n## Database\n\nUse these commands to control `PostgreSQL` service:\n\n1. `$ brew services start PostgreSQL`\n2. `$ brew services stop PostgreSQL`\n3. `$ brew services restart PostgreSQL`\n\n**Troubleshooting**\n\n```\nError: connect ECONNREFUSED 127.0.0.1:5432\n```\nIf PostgreSQL stops working for no particular reason, run: `rm /usr/local/var/postgres/postmaster.pid` you can find [more information here](https://stackoverflow.com/questions/17800249/postgres-db-not-starting-on-mac-osx-error-says-connections-on-unix-domain-sock)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloper239%2Flocalized-graphql-koa-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeveloper239%2Flocalized-graphql-koa-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloper239%2Flocalized-graphql-koa-typescript/lists"}