-
-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,15 @@ if (__DEV__ && __SERVER__) { | |
if (arguments.length == 1 && typeof arguments[0] === 'string' && arguments[0].match(/^\[(HMR|WDS)\]/)) { | ||
console_log('backend ' + arguments[0]); | ||
} else { | ||
console_log.apply(console_log, arguments); | ||
console_log.apply(global.console, arguments); | ||
} | ||
}; | ||
|
||
// let console_err = global.console.error; | ||
// global.console.error = function() { | ||
// arguments[0] = 'ce ' + new Error().stack + '\n\n\n' + arguments[0]; | ||
// console_err.apply(global.console, arguments); | ||
// }; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
larixer
Author
Member
|
||
} | ||
|
||
export default log; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
import { makeExecutableSchema, addErrorLoggingToSchema } from 'graphql-tools'; | ||
import { makeExecutableSchema } from 'graphql-tools'; | ||
|
||
import rootSchemaDef from './rootSchema.graphqls'; | ||
import modules from '../modules'; | ||
import pubsub from './pubsub'; | ||
import log from '../../common/log'; | ||
|
||
const executableSchema = makeExecutableSchema({ | ||
typeDefs: [rootSchemaDef].concat(modules.schemas), | ||
resolvers: modules.createResolvers(pubsub) | ||
}); | ||
|
||
addErrorLoggingToSchema(executableSchema, { log: e => log.error(e) }); | ||
|
||
export default executableSchema; |
Why do we need dead code?