mirror of
https://github.com/wassname/talk.git
synced 2026-08-20 12:50:41 +08:00
replaced eslint:recommended with prettier
This commit is contained in:
+9
-7
@@ -3,14 +3,14 @@ const {
|
||||
addSchemaLevelResolveFunction,
|
||||
} = require('graphql-tools');
|
||||
const debug = require('debug')('talk:graph:schema');
|
||||
const {decorateWithHooks} = require('./hooks');
|
||||
const {decorateWithErrorHandler} = require('./errorHandler');
|
||||
const { decorateWithHooks } = require('./hooks');
|
||||
const { decorateWithErrorHandler } = require('./errorHandler');
|
||||
|
||||
const plugins = require('../services/plugins');
|
||||
const resolvers = require('./resolvers');
|
||||
const typeDefs = require('./typeDefs');
|
||||
|
||||
const schema = makeExecutableSchema({typeDefs, resolvers});
|
||||
const schema = makeExecutableSchema({ typeDefs, resolvers });
|
||||
|
||||
// Plugin to the schema level resolvers to provide an before/after hook.
|
||||
decorateWithHooks(schema, plugins.get('server', 'hooks'));
|
||||
@@ -19,10 +19,12 @@ decorateWithHooks(schema, plugins.get('server', 'hooks'));
|
||||
decorateWithErrorHandler(schema);
|
||||
|
||||
// For each schemaLevelResolveFunction, add it to the schema.
|
||||
plugins.get('server', 'schemaLevelResolveFunction').forEach(({plugin, schemaLevelResolveFunction}) => {
|
||||
debug(`added schemaLevelResolveFunction from plugin '${plugin.name}'`);
|
||||
plugins
|
||||
.get('server', 'schemaLevelResolveFunction')
|
||||
.forEach(({ plugin, schemaLevelResolveFunction }) => {
|
||||
debug(`added schemaLevelResolveFunction from plugin '${plugin.name}'`);
|
||||
|
||||
addSchemaLevelResolveFunction(schema, schemaLevelResolveFunction);
|
||||
});
|
||||
addSchemaLevelResolveFunction(schema, schemaLevelResolveFunction);
|
||||
});
|
||||
|
||||
module.exports = schema;
|
||||
|
||||
Reference in New Issue
Block a user