Skip to content

Instantly share code, notes, and snippets.

@mxstbr
Created October 18, 2017 17:39
Show Gist options
  • Save mxstbr/a25b08183916f6356de2d4e8cb4a80b4 to your computer and use it in GitHub Desktop.
Save mxstbr/a25b08183916f6356de2d4e8cb4a80b4 to your computer and use it in GitHub Desktop.
import createLogger from 'graphql-log';
let list = [];
const logExecutions = createLogger({
logger: (name) => {
list.push(name);
fs.writeFileSync('resolvers.js', JSON.stringify(list, null, 2));
},
});
logExecutions(resolvers);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment