<commit_before>export default {
	Query: {
		items: (root, args, context) => context.database.collection('rsbuddy').find({}, {transactions: false}).toArray(),
		item: async (root, {id}, context) => {
			return (await context.database.collection('rsbuddy').find({id}, {transactions: false}).toArray())[0]
		}
	},
	Item: {
		transactions: async (parent, args, context) => {
			return (await context.database.collection('rsbuddy').find({id: parent.id}, {_id: false, transactions: true}).next()).transactions
		}
	}
}
<commit_msg>Update resolvers with cleaner syntax<commit_after>export default {
	Query: {
		items: async (root, {ids}, context) => {
			if (ids)
				return context.database.collection('rsbuddy').find({id: {$in: ids}}).toArray()
			else
				return context.database.collection('rsbuddy').find({}, {transactions: false}).toArray()
		},
		item: (root, {id}, context) => context.database.collection('rsbuddy').findOne({id}, {transactions: false})
	},
	Item: {
		transactions: async (root, args, context) => {
			return (await context.database.collection('rsbuddy').findOne({id: root.id}, {_id: false, transactions: true})).transactions
		}
	}
}
{'fraction_non_alphanumeric': 0.19374456993918332, 'fraction_numerical': 0.0008688097306689834, 'mean_word_length': 5.227027027027027, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6153381', 'n_tokens_mistral': 405, 'n_tokens_neox': 372, 'n_words': 78}