code: function normalizeFields(fields) {
  	const _fields = {};
  	Object.keys(fields).forEach(k => {
  		if (fields[k].constructor == Object && !fields[k].type) {
  			_fields[k] = normalizeFields(fields[k]);
  		} else {
  			_fields[k] = 1;
  		}
  	});
  	return _fields;
  }
docs: Simply convert mongoose schema to nextql fields