Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wurde/ts-graphql-api
An example backend API using TypeGraphQL library.
https://github.com/wurde/ts-graphql-api
express graphql sqlite3 typescript
Last synced: 5 days ago
JSON representation
An example backend API using TypeGraphQL library.
- Host: GitHub
- URL: https://github.com/wurde/ts-graphql-api
- Owner: wurde
- License: mit
- Created: 2020-01-11T04:32:04.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T22:24:50.000Z (almost 2 years ago)
- Last Synced: 2024-04-20T14:44:45.140Z (7 months ago)
- Topics: express, graphql, sqlite3, typescript
- Language: TypeScript
- Size: 866 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TypeGraphQL Backend API
An example backend API using TypeGraphQL library.
It's a GraphQL API in Node.js with TypeScript. In
this demo app I explore how TypeGraphQL addresses
the issue of reduntant code often associated with
this tech stack. It does this by allowing a developer
to define their API using classes and decorators.## Getting started
Getting the server to run locally is as simple as
cloning the repo, installing dependenices, and
running `npm run start:dev`. This will spin up a GraphQL
Playground environment with hot reloading.```shell
git clone https://github.com/wurde/ts-graphql-api
cd ts-graphql-api
npm install
npm run start:dev
// Open up http://localhost:4000/graphql
```## Apollo Server
For a GraphQL server I use Apollo. This allows
passing in an executable `schema`, which combines
both type definitions and resolvers.## SQLite with TypeORM
I use SQLite as a local data store and TypeORM for
object-relational mapping (ORM).## References
- https://typegraphql.ml/
- https://apollographql.com/
- https://typeorm.io/
- https://sqlite.org/