Working version
This commit is contained in:
+4
-2
@@ -2,16 +2,18 @@ import dotenv from 'dotenv';
|
||||
dotenv.config();
|
||||
|
||||
import { ApolloServer } from 'apollo-server';
|
||||
|
||||
import knexStringcase from 'knex-stringcase';
|
||||
import { dbConfig } from './config';
|
||||
import { typeDefs } from './schema';
|
||||
import resolvers from './resolvers';
|
||||
|
||||
import { OrderAPI } from './datasources/order';
|
||||
|
||||
const knexConfig = knexStringcase(dbConfig);
|
||||
|
||||
// set up any dataSources our resolvers need
|
||||
const dataSources = () => ({
|
||||
orderApi: new OrderAPI(dbConfig),
|
||||
orderApi: new OrderAPI(knexConfig),
|
||||
});
|
||||
|
||||
const context = async ({ req }) => {
|
||||
|
||||
Reference in New Issue
Block a user