enables lean mongoose queries for all find operations
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
const { GraphQLEnumType } = require('graphql');
|
||||
|
||||
const buildFallbackLocaleInputType = (localization) => {
|
||||
return new GraphQLEnumType({
|
||||
name: 'FallbackLocaleInputType',
|
||||
values: [...localization.locales, 'none'].reduce((values, locale) => ({
|
||||
...values,
|
||||
[locale]: {
|
||||
value: locale,
|
||||
},
|
||||
}), {}),
|
||||
});
|
||||
};
|
||||
const buildFallbackLocaleInputType = (localization) => new GraphQLEnumType({
|
||||
name: 'FallbackLocaleInputType',
|
||||
values: [...localization.locales, 'none'].reduce((values, locale) => ({
|
||||
...values,
|
||||
[locale]: {
|
||||
value: locale,
|
||||
},
|
||||
}), {}),
|
||||
});
|
||||
|
||||
module.exports = buildFallbackLocaleInputType;
|
||||
|
||||
Reference in New Issue
Block a user