https://github.com/foridpathan/node-graphql-with-mysql
GraphQL 4, NodeJs with Mysql2 Sequelize
https://github.com/foridpathan/node-graphql-with-mysql
express expressjs graphql mysql nodejs
Last synced: 6 months ago
JSON representation
GraphQL 4, NodeJs with Mysql2 Sequelize
- Host: GitHub
- URL: https://github.com/foridpathan/node-graphql-with-mysql
- Owner: foridpathan
- Created: 2022-11-12T07:43:47.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-12T08:37:22.000Z (about 3 years ago)
- Last Synced: 2025-04-02T21:44:15.612Z (9 months ago)
- Topics: express, expressjs, graphql, mysql, nodejs
- Language: TypeScript
- Homepage:
- Size: 132 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## GraphQL 4, NodeJs with Mysql2 Sequelize
GraphQl is most populer API query language. I try to connect with MySQL and GraphQL with NodeJS
    
#### Follow the instructions
- Clone Git Repo: `git clone https://github.com/foridpathan/node-graphql-with-mysql.git`
- Open the folder: `cd node-graphql-with-mysql`
- Rename `.env.sample file to .env` and add your database, user and password
- Install all the dependencis `npm i`
- Start server `npm start`
#### Advance Features
> Configured GraphQL-CodeGen CLI. That can generate code from your GraphQL operations and schema
**CodeGen Configuation files**
- YML configure files inside `src/codegen` folder there is two files
- `schema.yml` for generate schemas
- `types.yml` for generate types
- Type and Schemas inside this folder `src/graphql` there have two folder
- `models/**/type.graphql` there have requred to this `type.graphql` all subfolders
- `schema/**/*..graphql` there have all mutation and querys
- Now run `npm run generate:schema & npm run generate:types`
If there have any issue feel free to contribute or mail [foridpathan45@gmail.com](mailto:foridpathan45@gmail.com "foridpathan45@gmail.com")