Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
knexOptions: { connection: process.env.KNEX_URI || 'postgres://localhost/keystone' },
}),
}[adapterName];
const keystone = new Keystone({
name,
adapter: new Adapter(await argGenerator()),
defaultAccess: { list: true, field: true },
schemaNames,
...keystoneOptions,
});
createLists(keystone);
const apps = [
new GraphQLApp({
schemaName,
apiPath: '/admin/api',
graphiqlPath: '/admin/graphiql',
apollo: {
tracing: true,
cacheControl: {
defaultMaxAge: 3600,
},
},
...graphqlOptions,
}),
];
const { middlewares } = await keystone.prepare({ dev: true, apps });
const app = express();