<commit_before>import {
	Category,
	Attack,
	Pokemon
} from '../models';
import CategoryType from './CategoryType';
import AttackType from './AttackType';
import { 
	GraphQLObjectType, 
	GraphQLID, 
	GraphQLInt, 
	GraphQLString,
	GraphQLList
} from 'graphql';

const PokemonType = new GraphQLObjectType({
	name : 'pokemon',
	fields : () => ({
		id : {
			type : GraphQLID
		},
		name : {
			type : GraphQLString
		},
		number : {
			type : GraphQLInt
		},
		attack : {
			type : new GraphQLList(AttackType),
			resolve: (pokemon) => {
				return Attack.find({
					_id: {
						$in: pokemon.attacks.map((id) => id.toString())
					} 
				});
			}
		},
		categories : {
			type : new GraphQLList(CategoryType),
			resolve: (pokemon) => {
				return Category.find({
					_id: {
						$in: pokemon.categories.map((id) => id.toString())
					} 
				});
			}
		},
		preEvolution : {
			type : PokemonType,
			resolve: (pokemon) => {
				return Pokemon.findOne({
					_id: pokemon.preEvolution.toString()
				});
			}
		},
		evolution : {
			type : PokemonType,
			resolve: (pokemon) => {
				return Pokemon.findOne({
					_id: pokemon.evolution.toString()
				});
			}
		}
	})
});

export default PokemonType;<commit_msg>Change attack attribute for attacks<commit_after>import {
	Category,
	Attack,
	Pokemon
} from '../models';
import CategoryType from './CategoryType';
import AttackType from './AttackType';
import { 
	GraphQLObjectType, 
	GraphQLID, 
	GraphQLInt, 
	GraphQLString,
	GraphQLList
} from 'graphql';

const PokemonType = new GraphQLObjectType({
	name : 'pokemon',
	fields : () => ({
		id : {
			type : GraphQLID
		},
		name : {
			type : GraphQLString
		},
		number : {
			type : GraphQLInt
		},
		attacks : {
			type : new GraphQLList(AttackType),
			resolve: (pokemon) => {
				return Attack.find({
					_id: {
						$in: pokemon.attacks.map((id) => id.toString())
					} 
				});
			}
		},
		categories : {
			type : new GraphQLList(CategoryType),
			resolve: (pokemon) => {
				return Category.find({
					_id: {
						$in: pokemon.categories.map((id) => id.toString())
					} 
				});
			}
		},
		preEvolution : {
			type : PokemonType,
			resolve: (pokemon) => {
				return Pokemon.findOne({
					_id: pokemon.preEvolution.toString()
				});
			}
		},
		evolution : {
			type : PokemonType,
			resolve: (pokemon) => {
				return Pokemon.findOne({
					_id: pokemon.evolution.toString()
				});
			}
		}
	})
});

export default PokemonType;
{'fraction_non_alphanumeric': 0.15315682281059062, 'fraction_numerical': 0.0, 'mean_word_length': 2.68215892053973, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '74718', 'n_tokens_mistral': 1099, 'n_tokens_neox': 870, 'n_words': 169}