-
-
Save mxstbr/d9bece1c74cd9d02e1e6c99c8df86d69 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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