Skip to content

Instantly share code, notes, and snippets.

@mxstbr mxstbr/query-whitelisting.js Secret
Created Feb 20, 2018

What would you like to do?
app.use('/api', graphqlServer((req, res) => {
const query = req.query.query || req.body.query;
// TODO: Get whitelist somehow
if (!whitelist[query]) {
throw new Error('Query is not in whitelist.');
/* ... */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.