From e1444e767f2b92193e6a2db683c5d83c7c1ffb8a Mon Sep 17 00:00:00 2001 From: Hitesh Riziya Date: Tue, 9 Apr 2019 15:05:10 +0530 Subject: [PATCH] Instead of `mysql` use `promise-mysql` In graphql browser when I execute the query, I am getting an error saying "pool.query(...).then is not a function" because I had to use the `promise-mysql` to solve it. --- utl/create_file_func/sql_pool.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utl/create_file_func/sql_pool.js b/utl/create_file_func/sql_pool.js index e75df5d..128d5c4 100644 --- a/utl/create_file_func/sql_pool.js +++ b/utl/create_file_func/sql_pool.js @@ -3,7 +3,7 @@ function sqlPool(database) { // if MySQL, create MySQL specific code if (database === 'MySQL') { - query += `const mysql = require('mysql') + query += `const mysql = require('promise-mysql') const pool = mysql.createPool({ connectionLimit: 10,