{"id":15292808,"url":"https://github.com/johnrazeur/generator-graphql-typescript","last_synced_at":"2025-04-13T11:33:45.162Z","repository":{"id":35016249,"uuid":"196886576","full_name":"johnrazeur/generator-graphql-typescript","owner":"johnrazeur","description":"Create an awesome GraphQL API with typescript","archived":false,"fork":false,"pushed_at":"2023-01-05T20:52:16.000Z","size":1170,"stargazers_count":6,"open_issues_count":14,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-27T02:43:33.658Z","etag":null,"topics":["generator-graphql-typescript","graphql","graphql-api","typegraphql-typeorm","typescript"],"latest_commit_sha":null,"homepage":null,"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/johnrazeur.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-14T21:48:00.000Z","updated_at":"2023-02-16T18:58:52.000Z","dependencies_parsed_at":"2023-01-15T12:05:02.358Z","dependency_job_id":null,"html_url":"https://github.com/johnrazeur/generator-graphql-typescript","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrazeur%2Fgenerator-graphql-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrazeur%2Fgenerator-graphql-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrazeur%2Fgenerator-graphql-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnrazeur%2Fgenerator-graphql-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnrazeur","download_url":"https://codeload.github.com/johnrazeur/generator-graphql-typescript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248530609,"owners_count":21119601,"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":["generator-graphql-typescript","graphql","graphql-api","typegraphql-typeorm","typescript"],"created_at":"2024-09-30T16:27:19.540Z","updated_at":"2025-04-13T11:33:45.141Z","avatar_url":"https://github.com/johnrazeur.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# generator-graphql-typescript [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage percentage][coveralls-image]][coveralls-url]\n\u003e Create a Graphql API in typescript with [type-graphql](https://typegraphql.ml/) and [Typeorm](https://typeorm.io/#/)\n\n![](screenshot.png)\n\n\n## Installation\n\nFirst, install [Yeoman](http://yeoman.io) and generator-rest-express-typescript using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).\n\n```bash\nnpm install -g yo\nnpm install -g generator-graphql-typescript\n```\n\nThen generate your new project:\n\n```bash\nyo graphql-typescript myapp\n```\n## Getting Started\n\n* Run `npm start` to preview and watch for changes\n* Run `npm run build` to create the production version\n* Run `npm run test` to lauch jest test\n\n\n## Queries\n\n### Login\n\n```graphql\nquery login(\n    input: $input\n  ) {\n    ... on LoginType {\n      __typename\n      token\n    }\n    ... on UserError {\n      __typename\n      message\n    }\n  }\n}\n```\n\n### Get projects\n\nYou need to put the token you get from the login query to perform this query. Prefix the authorization header with `bearer`.\n\n```json\n{\n  \"Authorization\": \"bearer thetoken\"\n}\n```\n\n```graphql\nquery {\n  projects { \n    name,\n    owner { email }\n  }\n} \n```\n\n## Mutations\n\n### Register\n\n```graphql\nmutation {\n  register(\n    input: $input\n  ) {\n    ... on User {\n      __typename\n      username\n      email\n    }\n    ... on UserError {\n      __typename\n      message\n    }\n  }\n}\n```\n\n### Add project\n\nYou need to put the token you get from the login query to perform this query. Prefix the authorization header with `bearer`.\n\n```json\n{\n  \"Authorization\": \"bearer thetoken\"\n}\n```\n\n```graphql\nmutation {\n  createProject(\n    input: $input\n  ) {\n    __typename\n    ... on Project {\n      name\n    }\n    ... on UserError {\n      message\n    }\n  }\n}\n```\n\n## TODO 🚧  \n\n* Add subcommand to create a new resolver\n\n## Contribute\n\nSee the [contributing docs](contributing.md).\n\n## License\n\nMIT © [Clément Lafont](johnrazeur@gmail.com)\n\n\n[npm-image]: https://badge.fury.io/js/generator-graphql-typescript.svg\n[npm-url]: https://npmjs.org/package/generator-graphql-typescript\n[travis-image]: https://travis-ci.org/johnrazeur/generator-graphql-typescript.svg?branch=master\n[travis-url]: https://travis-ci.org/johnrazeur/generator-graphql-typescript\n[coveralls-image]: https://coveralls.io/repos/johnrazeur/generator-graphql-typescript/badge.svg\n[coveralls-url]: https://coveralls.io/r/johnrazeur/generator-graphql-typescript\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnrazeur%2Fgenerator-graphql-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnrazeur%2Fgenerator-graphql-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnrazeur%2Fgenerator-graphql-typescript/lists"}