Merge branch 'master' into scraper

This commit is contained in:
Wyatt Johnson
2018-03-26 09:29:52 -06:00
committed by GitHub
2 changed files with 27 additions and 9 deletions
+10 -1
View File
@@ -19,4 +19,13 @@ Configuration:
- `TALK_CLIENT_FORCE_NOTIFICATION_SETTINGS` - When `TRUE`, the settings pane for notifications will show always, even if the user does not have a `local` profile. (Default `FALSE`).
You can enable other notification options by adding more
`talk-plugin-notification-*` plugins!
`talk-plugin-notification-*` plugins!
## Email Subjects
While it seems in your notification category plugin you can set the subject
line by adjusting the translation, Talk's default behavior is to add a prefix
before the subject of each email sent. This is always set to the
[TALK-EMAIL-SUBJECT-PREFIX](/talk/advanced-configuration/#TALK-EMAIL-SUBJECT-PREFIX)
configuration variable. You should change this parameter if you want to affect
how the subject is rendered.
+17 -8
View File
@@ -103,16 +103,25 @@ function getIntrospectionQuery(options = {}) {
`;
}
const generateIntrospectionResult = (resultLocation, options = {}) =>
graphql(schema, getIntrospectionQuery(options)).then(({ data }) => {
// Serialize the introspection result as JSON.
const introspectionResult = JSON.stringify(data, null, 2);
const generateIntrospectionResult = async (resultLocation, options = {}) => {
const dir = path.dirname(resultLocation);
try {
fs.accessSync(dir);
} catch (err) {
console.log(`Cannot write to ${dir}, not generating introspection.json`);
return;
}
// Write the introspection result to the filesystem.
fs.writeFileSync(resultLocation, introspectionResult, 'utf8');
const { data } = await graphql(schema, getIntrospectionQuery(options));
console.log(`Outputted result of introspectionQuery to ${resultLocation}`);
});
// Serialize the introspection result as JSON.
const introspectionResult = JSON.stringify(data, null, 2);
// Write the introspection result to the filesystem.
fs.writeFileSync(resultLocation, introspectionResult, 'utf8');
console.log(`Outputted result of introspectionQuery to ${resultLocation}`);
};
const graphIntrospectionFilename = path.resolve(
__dirname,