db2graphql
Advanced tools
Comparing version 0.3.8 to 0.3.9
{ | ||
"name": "db2graphql", | ||
"version": "0.3.8", | ||
"version": "0.3.9", | ||
"description": "Generate Graphql schema based on existing relational database", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -153,6 +153,6 @@ const utils = require('../utils/utils'); | ||
this.resolvers[namespace][name] = async (root = null, args = {}, context = {}) => { | ||
const db = this.dbDriver ? this.dbDriver.db : null; | ||
context.ioc = { resolver: this, db }; | ||
const passBefore = await this.beforeHook.validator(namespace, name, root, args, context); | ||
if (!passBefore) return await this.beforeHook.rejected(namespace, name, root, args, context); | ||
const db = this.dbDriver ? this.dbDriver.db : null; | ||
context.ioc = { resolver: this, db }; | ||
return await cb(root, args, context); | ||
@@ -159,0 +159,0 @@ } |