New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

db2graphql

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

db2graphql - npm Package Compare versions

Comparing version 0.7.0 to 0.8.1

demo_mssql/connection.example.json

12

package.json
{
"name": "db2graphql",
"version": "0.7.0",
"version": "0.8.1",
"description": "Generate Graphql schema based on existing relational database",

@@ -10,6 +10,8 @@ "main": "index.js",

"scripts": {
"demo-pg": "sudo psql -h localhost -U postgres -f ./demo/database.sql db2graphql",
"demo-mysql": "sudo mysql --user=root --password db2graphql < ./demo_mysql/database.sql",
"demo-pg": "psql -h localhost -U postgres -f ./demo/database.sql db2graphql",
"demo-mysql": "mysql --user=root --password db2graphql < ./demo_mysql/database.sql",
"demo-mssql": "sqlcmd -S localhost\\SQLEXPRESS -i ./demo_mssql/database.sql",
"start": "nodemon demo",
"start-mysql": "nodemon demo_mysql",
"start-mssql": "nodemon demo_mssql",
"docs:update": "jsdoc src --debug -d docs -R README.md -t docstemplates/default",

@@ -40,5 +42,7 @@ "test": "jest --maxWorkers=1",

"knex": "^0.21.7",
"mssql": "^8.1.2",
"mysql": "^2.18.1",
"nodemon": "^2.0.6",
"pg": "^8.4.1"
"pg": "^8.4.1",
"tedious": "^14"
},

@@ -45,0 +49,0 @@ "jest": {

@@ -12,3 +12,3 @@ <p align="center">

[![NPM Version Badge](https://img.shields.io/npm/v/db2graphql.svg)](https://www.npmjs.com/package/db2graphql)
[![Build Status Badge](https://travis-ci.org/taviroquai/db2graphql.svg?branch=master)](https://travis-ci.org/taviroquai/db2graphql)
[![Build Status Badge](https://api.travis-ci.com/taviroquai/db2graphql.svg?branch=master)](https://app.travis-ci.com/github/taviroquai/db2graphql)
[![Coverage Status Badge](https://coveralls.io/repos/github/taviroquai/db2graphql/badge.svg?branch=master)](https://coveralls.io/github/taviroquai/db2graphql?branch=master)

@@ -21,3 +21,3 @@ ![Dependencies Badge](https://img.shields.io/david/taviroquai/db2graphql.svg?style=flat)

* Fully compatible with **express**, **koa**, **hapi** and **Apollo Server**
* Converts an existing relational database (only PostgreSQL and MySQL for now) schema to a JSON schema
* Converts an existing relational database (only PostgreSQL, MySQL and MSSql for now) schema to a JSON schema
* Generates a Graphql SDL schema with convenient types, queries and mutations

@@ -60,3 +60,3 @@ * Implements a generic Graphql resolver ready for API prototyping

## Limitations/TODO
* Only PostgreSQL and MySQL supported
* Only PostgreSQL, MySQLand MSSql supported
* Better database types handling

@@ -63,0 +63,0 @@ * Better database queries optimization

@@ -159,3 +159,3 @@ const hash = require('string-hash-64');

let query = this.db(fullname);
query.returning(pk)
query.returning(pk);
result = await query.insert(data.input);

@@ -162,0 +162,0 @@ if (data._debug) console.log('db insert:', query.toSQL().sql, query.toSQL().bindings);

const PostgreSQL = require('../src/adapters/postgres');
const Mysql = require('../src/adapters/mysql');
const MSSql = require('../src/adapters/mssql');
const Compiler = require('../src/graphql/compiler');

@@ -35,3 +36,4 @@ const Resolver = require('../src/graphql/resolver');

pg: PostgreSQL,
mysql: Mysql
mysql: Mysql,
mssql: MSSql
}

@@ -38,0 +40,0 @@ this.connection = db;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc