Extended and improved transfer tool. Moved scenes up on movie page.
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
const config = require('config');
|
||||
const { withPostGraphileContext } = require('postgraphile');
|
||||
const { graphql } = require('graphql');
|
||||
|
||||
const pg = require('./postgraphile');
|
||||
const initPg = require('./postgraphile');
|
||||
const logger = require('../logger')(__filename);
|
||||
|
||||
async function query(graphqlQuery, params) {
|
||||
async function query(graphqlQuery, params, role = 'query') {
|
||||
const pg = initPg(config.database[role]);
|
||||
|
||||
return withPostGraphileContext(pg, async (context) => {
|
||||
const schema = await pg.getGraphQLSchema();
|
||||
const result = await graphql(schema, graphqlQuery, null, context, params);
|
||||
|
||||
Reference in New Issue
Block a user