addErrorLoggingToSchema(schema, { log: e => { if (app.logFormat === 'text') return console.error(e.message); if (app.logFormat === 'json') return console.error( JSON.stringify({ message: e.message, error: e, stack: e.stack, type: 'Error' }) ); } });
addErrorLoggingToSchema(executableSchema, { log: (e) => console.log(e) });