Esempio n. 1
0
        public BossType(MafiaData data)
        {
            Name        = "Boss";
            Description = "The family boss.";

            Field(d => d.Id).Description("The id of the mafia member.");
            Field(d => d.Name).Description("The name of the mafia member.");
            Field(d => d.IdFamily, nullable: true).Description("The name of the family.");

            Interface <MafiaMemberInterface>();
        }
Esempio n. 2
0
        public SoldierType(MafiaData data)
        {
            Name        = "Soldier";
            Description = "A common soldier from the family.";

            Field(d => d.Id).Description("The id of the mafia member.");
            Field(d => d.Name).Description("The name of the mafia member.");
            Field(d => d.IdFamily, nullable: true).Description("The name of the family.");
            Field(d => d.Hits, nullable: true).Description("The hits made.");

            Interface <MafiaMemberInterface>();
        }
        public UnderBossType(MafiaData data)
        {
            Name        = "UnderBoss";
            Description = "The mamma mia family.";

            Field(d => d.Id).Description("The id of the mafia member.");
            Field(d => d.Name).Description("The name of the mafia member.");
            Field(d => d.IdFamily, nullable: true).Description("The name of the family.");

            Field <ListGraphType <CapoInterface> >(
                "capos",
                resolve: context => data.GetUnderBossCapos(context.Source)
                );

            Interface <UnderBossInterface>();
        }
Esempio n. 4
0
        public CapoType(MafiaData data)
        {
            Name        = "Capo";
            Description = "A capo from the family.";

            Field(d => d.Id).Description("The id of the mafia member.");
            Field(d => d.Name).Description("The name of the mafia member.");
            Field(d => d.IdFamily, nullable: true).Description("The name of the family.");
            Field(d => d.Hits, nullable: true).Description("The hits made.");

            Field <ListGraphType <CapoInterface> >(
                "soldiers",
                resolve: context => data.GetCapoSoldiers(context.Source)
                );
            Field <ListGraphType <ZoneOfOperationsEnum> >("appearsIn", "Which movie they appear in.");

            Interface <CapoInterface>();
        }