Gathering detailed insights and metrics for @teamstarter/graphql-sequelize-generator
Gathering detailed insights and metrics for @teamstarter/graphql-sequelize-generator
Gathering detailed insights and metrics for @teamstarter/graphql-sequelize-generator
Gathering detailed insights and metrics for @teamstarter/graphql-sequelize-generator
A Graphql API generator based on Sequelize.
npm install @teamstarter/graphql-sequelize-generator
Typescript
Module System
Min. Node Version
Node Version
NPM Version
55.9
Supply Chain
88.2
Quality
87.5
Maintenance
25
Vulnerability
95.6
License
JavaScript (71.52%)
TypeScript (28.48%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
22 Stars
352 Commits
10 Forks
17 Watchers
16 Branches
8 Contributors
Updated on Mar 27, 2025
Latest Version
9.6.2
Package Id
@teamstarter/graphql-sequelize-generator@9.6.2
Unpacked Size
315.89 kB
Size
52.04 kB
File Count
67
NPM Version
9.6.7
Node Version
18.17.1
Published on
May 21, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
13
4
32
Graphql-Sequelize-Generator (GSG) is a set of tools that will allow you to easily generate a GraphQL API from your sequelize models.
It's a very good fit for POCs and MVPs, while also scaling pretty well thanks to dataloader-sequelize.
The complete documentation car be found here
The tools provided by this library will allow you to:
Add the lib and the peer dependencies of GraphQL-Sequelize-Generator:
yarn add graphql-sequelize-generator graphql sequelize graphql-sequelize @apollo/server dataloader-sequelize graphql-relay ws
⚠️ Caution: GSG requires Node v9.11.2 or greater as it is using async/await.
If you need to initialize the project, please follow this Sequelize documentation page : Sequelize-Cli and Migrations
Create a file where you will set up your server and paste the following code. We used index.js (at the root of our example project):
1// index.js 2const { expressMiddleware } = require('@apollo/server/express4') 3const express = require('express') 4const http = require('http') 5const cors = require('cors') 6const json = require('body-parser') 7const { createContext, EXPECTED_OPTIONS_KEY } = require('dataloader-sequelize') 8const setupServer = require('./schema') 9const models = require('./models') //Assuming "models" is your import of the Sequelize models folder, initialized by Sequelize-Cli 10 11const createServer = async (options = {}, globalPreCallback = () => null) => { 12 const app = express() 13 options = { 14 spdy: { plain: true }, 15 ...options, 16 } 17 const httpServer = http.createServer(options, app) 18 const { server } = setupServer(globalPreCallback, httpServer) 19 await server.start() 20 //server.applyMiddleware({ app, path: '/graphql' }) 21 app.use( 22 '/graphql', 23 cors(), 24 json(), 25 expressMiddleware(server, { 26 context: async ({ req, connection }) => { 27 const contextDataloader = createContext(models.sequelize) 28 29 // Connection is provided when a webSocket is connected. 30 if (connection) { 31 // check connection for metadata 32 return { 33 ...connection.context, 34 [EXPECTED_OPTIONS_KEY]: contextDataloader, 35 } 36 } 37 }, 38 }) 39 ) 40 41 await new Promise((resolve) => { 42 httpServer.listen(process.env.PORT || 8080, () => { 43 resolve() 44 }) 45 46 console.log( 47 `🚀 Server ready at http://localhost:${process.env.PORT || 8080}/graphql` 48 ) 49 }) 50 return httpServer 51} 52 53const closeServer = async (server) => { 54 await Promise.all([new Promise((resolve) => server.close(() => resolve()))]) 55} 56 57createServer()
You can easily start a project with graphql-sequelize-generator using these boilerplates:
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/22 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
61 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More